Changeset 22405 in vbox for trunk/src/libs/libxml2-2.6.30/parser.c
- Timestamp:
- Aug 24, 2009 8:33:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/libxml2-2.6.30/parser.c
r16778 r22405 4735 4735 xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, 4736 4736 "Name expected in NOTATION declaration\n"); 4737 return(ret); 4737 xmlFreeEnumeration(ret); 4738 return(NULL); 4738 4739 } 4739 4740 cur = xmlCreateEnumeration(name); 4740 if (cur == NULL) return(ret); 4741 if (cur == NULL) { 4742 xmlFreeEnumeration(ret); 4743 return(NULL); 4744 } 4741 4745 if (last == NULL) ret = last = cur; 4742 4746 else { … … 4748 4752 if (RAW != ')') { 4749 4753 xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL); 4750 if ((last != NULL) && (last != ret)) 4751 xmlFreeEnumeration(last); 4752 return(ret); 4754 xmlFreeEnumeration(ret); 4755 return(NULL); 4753 4756 } 4754 4757 NEXT; … … 4791 4794 cur = xmlCreateEnumeration(name); 4792 4795 xmlFree(name); 4793 if (cur == NULL) return(ret); 4796 if (cur == NULL) { 4797 xmlFreeEnumeration(ret); 4798 return(NULL); 4799 } 4794 4800 if (last == NULL) ret = last = cur; 4795 4801 else { … … 5189 5195 xmlChar type = 0; 5190 5196 5197 if (ctxt->depth > 128) { 5198 xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, 5199 "xmlParseElementChildrenContentDecl : depth %d too deep\n", 5200 ctxt->depth); 5201 return(NULL); 5202 } 5203 5191 5204 SKIP_BLANKS; 5192 5205 GROW; … … 5197 5210 NEXT; 5198 5211 SKIP_BLANKS; 5212 ctxt->depth++; 5199 5213 cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid); 5214 ctxt->depth--; 5200 5215 SKIP_BLANKS; 5201 5216 GROW; … … 5327 5342 NEXT; 5328 5343 SKIP_BLANKS; 5344 ctxt->depth++; 5329 5345 last = xmlParseElementChildrenContentDecl(ctxt, inputid); 5346 ctxt->depth--; 5330 5347 SKIP_BLANKS; 5331 5348 } else {
Note:
See TracChangeset
for help on using the changeset viewer.