Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 280617 | Differences between
and this patch

Collapse All | Expand All

(-)parser.c.orig (-6 / +22 lines)
Lines 4778-4787 xmlParseNotationType(xmlParserCtxtPtr ct Link Here
4778
	if (name == NULL) {
4779
	if (name == NULL) {
4779
	    xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
4780
	    xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
4780
			   "Name expected in NOTATION declaration\n");
4781
			   "Name expected in NOTATION declaration\n");
4781
	    return(ret);
4782
            xmlFreeEnumeration(ret);
4783
	    return(NULL);
4782
	}
4784
	}
4783
	cur = xmlCreateEnumeration(name);
4785
	cur = xmlCreateEnumeration(name);
4784
	if (cur == NULL) return(ret);
4786
	if (cur == NULL) {
4787
            xmlFreeEnumeration(ret);
4788
            return(NULL);
4789
        }
4785
	if (last == NULL) ret = last = cur;
4790
	if (last == NULL) ret = last = cur;
4786
	else {
4791
	else {
4787
	    last->next = cur;
4792
	    last->next = cur;
Lines 4791-4799 xmlParseNotationType(xmlParserCtxtPtr ct Link Here
4791
    } while (RAW == '|');
4796
    } while (RAW == '|');
4792
    if (RAW != ')') {
4797
    if (RAW != ')') {
4793
	xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL);
4798
	xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL);
4794
	if ((last != NULL) && (last != ret))
4799
        xmlFreeEnumeration(ret);
4795
	    xmlFreeEnumeration(last);
4800
	return(NULL);
4796
	return(ret);
4797
    }
4801
    }
4798
    NEXT;
4802
    NEXT;
4799
    return(ret);
4803
    return(ret);
Lines 4834-4840 xmlParseEnumerationType(xmlParserCtxtPtr Link Here
4834
	}
4838
	}
4835
	cur = xmlCreateEnumeration(name);
4839
	cur = xmlCreateEnumeration(name);
4836
	xmlFree(name);
4840
	xmlFree(name);
4837
	if (cur == NULL) return(ret);
4841
	if (cur == NULL) {
4842
            xmlFreeEnumeration(ret);
4843
            return(NULL);
4844
        }
4838
	if (last == NULL) ret = last = cur;
4845
	if (last == NULL) ret = last = cur;
4839
	else {
4846
	else {
4840
	    last->next = cur;
4847
	    last->next = cur;
Lines 5232-5237 xmlParseElementChildrenContentDecl (xmlP Link Here
5232
    const xmlChar *elem;
5239
    const xmlChar *elem;
5233
    xmlChar type = 0;
5240
    xmlChar type = 0;
5234
5241
5242
    if (ctxt->depth > 128) {
5243
        xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED,
5244
                "xmlParseElementChildrenContentDecl : depth %d too deep\n",
5245
                          ctxt->depth);
5246
	return(NULL);
5247
    }
5235
    SKIP_BLANKS;
5248
    SKIP_BLANKS;
5236
    GROW;
5249
    GROW;
5237
    if (RAW == '(') {
5250
    if (RAW == '(') {
Lines 5240-5246 xmlParseElementChildrenContentDecl (xmlP Link Here
5240
        /* Recurse on first child */
5253
        /* Recurse on first child */
5241
	NEXT;
5254
	NEXT;
5242
	SKIP_BLANKS;
5255
	SKIP_BLANKS;
5256
        ctxt->depth++;
5243
        cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid);
5257
        cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid);
5258
        ctxt->depth--;
5244
	SKIP_BLANKS;
5259
	SKIP_BLANKS;
5245
	GROW;
5260
	GROW;
5246
    } else {
5261
    } else {
Lines 5370-5376 xmlParseElementChildrenContentDecl (xmlP Link Here
5370
	    /* Recurse on second child */
5385
	    /* Recurse on second child */
5371
	    NEXT;
5386
	    NEXT;
5372
	    SKIP_BLANKS;
5387
	    SKIP_BLANKS;
5388
            ctxt->depth++;
5373
	    last = xmlParseElementChildrenContentDecl(ctxt, inputid);
5389
	    last = xmlParseElementChildrenContentDecl(ctxt, inputid);
5390
            ctxt->depth--;
5374
	    SKIP_BLANKS;
5391
	    SKIP_BLANKS;
5375
	} else {
5392
	} else {
5376
	    elem = xmlParseName(ctxt);
5393
	    elem = xmlParseName(ctxt);

Return to bug 280617