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

Collapse All | Expand All

(-)libxml2-2.6.32/parser.c (-4 / +9 lines)
Lines 2381-2387 xmlStringLenDecodeEntities(xmlParserCtxt Link Here
2381
		xmlGenericError(xmlGenericErrorContext,
2381
		xmlGenericError(xmlGenericErrorContext,
2382
			"String decoding Entity Reference: %.30s\n",
2382
			"String decoding Entity Reference: %.30s\n",
2383
			str);
2383
			str);
2384
	    ctxt->depth += 3;
2384
	    ent = xmlParseStringEntityRef(ctxt, &str);
2385
	    ent = xmlParseStringEntityRef(ctxt, &str);
2386
	    ctxt->depth -= 3;
2387
	    if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
2388
	        goto int_error;
2385
	    if ((ent != NULL) &&
2389
	    if ((ent != NULL) &&
2386
		(ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
2390
		(ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
2387
		if (ent->content != NULL) {
2391
		if (ent->content != NULL) {
Lines 2394-2403 xmlStringLenDecodeEntities(xmlParserCtxt Link Here
2394
			    "predefined entity has no content\n");
2398
			    "predefined entity has no content\n");
2395
		}
2399
		}
2396
	    } else if ((ent != NULL) && (ent->content != NULL)) {
2400
	    } else if ((ent != NULL) && (ent->content != NULL)) {
2397
		ctxt->depth++;
2401
		ctxt->depth += 3;
2398
		rep = xmlStringDecodeEntities(ctxt, ent->content, what,
2402
		rep = xmlStringDecodeEntities(ctxt, ent->content, what,
2399
			                      0, 0, 0);
2403
			                      0, 0, 0);
2400
		ctxt->depth--;
2404
		ctxt->depth -= 3;
2401
		if (rep != NULL) {
2405
		if (rep != NULL) {
2402
		    current = rep;
2406
		    current = rep;
2403
		    while (*current != 0) { /* non input consuming loop */
2407
		    while (*current != 0) { /* non input consuming loop */
Lines 2432-2441 xmlStringLenDecodeEntities(xmlParserCtxt Link Here
2432
		    if (xmlLoadEntityContent(ctxt, ent) < 0) {
2436
		    if (xmlLoadEntityContent(ctxt, ent) < 0) {
2433
		    }
2437
		    }
2434
		}
2438
		}
2435
		ctxt->depth++;
2439
		ctxt->depth += 3;
2436
		rep = xmlStringDecodeEntities(ctxt, ent->content, what,
2440
		rep = xmlStringDecodeEntities(ctxt, ent->content, what,
2437
			                      0, 0, 0);
2441
			                      0, 0, 0);
2438
		ctxt->depth--;
2442
		ctxt->depth -= 3;
2439
		if (rep != NULL) {
2443
		if (rep != NULL) {
2440
		    current = rep;
2444
		    current = rep;
2441
		    while (*current != 0) { /* non input consuming loop */
2445
		    while (*current != 0) { /* non input consuming loop */
Lines 2466-2471 xmlStringLenDecodeEntities(xmlParserCtxt Link Here
2466
2470
2467
mem_error:
2471
mem_error:
2468
    xmlErrMemory(ctxt, NULL);
2472
    xmlErrMemory(ctxt, NULL);
2473
int_error:
2469
    if (rep != NULL)
2474
    if (rep != NULL)
2470
        xmlFree(rep);
2475
        xmlFree(rep);
2471
    if (buffer != NULL)
2476
    if (buffer != NULL)

Return to bug 234099