Lines 5306-5312
xmlParseNotationType(xmlParserCtxtPtr ctxt) {
Link Here
|
5306 |
if (name == NULL) { |
5306 |
if (name == NULL) { |
5307 |
xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, |
5307 |
xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, |
5308 |
"Name expected in NOTATION declaration\n"); |
5308 |
"Name expected in NOTATION declaration\n"); |
5309 |
return(ret); |
5309 |
xmlFreeEnumeration(ret); |
|
|
5310 |
return(NULL); |
5310 |
} |
5311 |
} |
5311 |
tmp = ret; |
5312 |
tmp = ret; |
5312 |
while (tmp != NULL) { |
5313 |
while (tmp != NULL) { |
Lines 5322-5328
xmlParseNotationType(xmlParserCtxtPtr ctxt) {
Link Here
|
5322 |
} |
5323 |
} |
5323 |
if (tmp == NULL) { |
5324 |
if (tmp == NULL) { |
5324 |
cur = xmlCreateEnumeration(name); |
5325 |
cur = xmlCreateEnumeration(name); |
5325 |
if (cur == NULL) return(ret); |
5326 |
if (cur == NULL) { |
|
|
5327 |
xmlFreeEnumeration(ret); |
5328 |
return(NULL); |
5329 |
} |
5326 |
if (last == NULL) ret = last = cur; |
5330 |
if (last == NULL) ret = last = cur; |
5327 |
else { |
5331 |
else { |
5328 |
last->next = cur; |
5332 |
last->next = cur; |
Lines 5333-5341
xmlParseNotationType(xmlParserCtxtPtr ctxt) {
Link Here
|
5333 |
} while (RAW == '|'); |
5337 |
} while (RAW == '|'); |
5334 |
if (RAW != ')') { |
5338 |
if (RAW != ')') { |
5335 |
xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL); |
5339 |
xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL); |
5336 |
if ((last != NULL) && (last != ret)) |
5340 |
xmlFreeEnumeration(ret); |
5337 |
xmlFreeEnumeration(last); |
5341 |
return(NULL); |
5338 |
return(ret); |
|
|
5339 |
} |
5342 |
} |
5340 |
NEXT; |
5343 |
NEXT; |
5341 |
return(ret); |
5344 |
return(ret); |
Lines 5390-5396
xmlParseEnumerationType(xmlParserCtxtPtr ctxt) {
Link Here
|
5390 |
cur = xmlCreateEnumeration(name); |
5393 |
cur = xmlCreateEnumeration(name); |
5391 |
if (!xmlDictOwns(ctxt->dict, name)) |
5394 |
if (!xmlDictOwns(ctxt->dict, name)) |
5392 |
xmlFree(name); |
5395 |
xmlFree(name); |
5393 |
if (cur == NULL) return(ret); |
5396 |
if (cur == NULL) { |
|
|
5397 |
xmlFreeEnumeration(ret); |
5398 |
return(NULL); |
5399 |
} |
5394 |
if (last == NULL) ret = last = cur; |
5400 |
if (last == NULL) ret = last = cur; |
5395 |
else { |
5401 |
else { |
5396 |
last->next = cur; |
5402 |
last->next = cur; |
Lines 5794-5799
xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) {
Link Here
|
5794 |
const xmlChar *elem; |
5800 |
const xmlChar *elem; |
5795 |
xmlChar type = 0; |
5801 |
xmlChar type = 0; |
5796 |
|
5802 |
|
|
|
5803 |
if (ctxt->depth > 128) { |
5804 |
xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, |
5805 |
"xmlParseElementChildrenContentDecl : depth %d too deep\n", |
5806 |
ctxt->depth); |
5807 |
return(NULL); |
5808 |
} |
5797 |
SKIP_BLANKS; |
5809 |
SKIP_BLANKS; |
5798 |
GROW; |
5810 |
GROW; |
5799 |
if (RAW == '(') { |
5811 |
if (RAW == '(') { |
Lines 5802-5808
xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) {
Link Here
|
5802 |
/* Recurse on first child */ |
5814 |
/* Recurse on first child */ |
5803 |
NEXT; |
5815 |
NEXT; |
5804 |
SKIP_BLANKS; |
5816 |
SKIP_BLANKS; |
|
|
5817 |
ctxt->depth++; |
5805 |
cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid); |
5818 |
cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid); |
|
|
5819 |
ctxt->depth--; |
5806 |
SKIP_BLANKS; |
5820 |
SKIP_BLANKS; |
5807 |
GROW; |
5821 |
GROW; |
5808 |
} else { |
5822 |
} else { |
Lines 5934-5940
xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) {
Link Here
|
5934 |
/* Recurse on second child */ |
5948 |
/* Recurse on second child */ |
5935 |
NEXT; |
5949 |
NEXT; |
5936 |
SKIP_BLANKS; |
5950 |
SKIP_BLANKS; |
|
|
5951 |
ctxt->depth++; |
5937 |
last = xmlParseElementChildrenContentDecl(ctxt, inputid); |
5952 |
last = xmlParseElementChildrenContentDecl(ctxt, inputid); |
|
|
5953 |
ctxt->depth--; |
5938 |
SKIP_BLANKS; |
5954 |
SKIP_BLANKS; |
5939 |
} else { |
5955 |
} else { |
5940 |
elem = xmlParseName(ctxt); |
5956 |
elem = xmlParseName(ctxt); |
5941 |
- |
|
|