From 55fecd6aa4af4a540812b81234679cd6b5714f1b Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 1 Nov 2023 18:24:55 +0100 Subject: [PATCH] Drop redundant "XML_GE == 1" guards These are redundant because further out there is a guard for "XML_GE == 1" already. In the visual world, the pattern is this: > #if XML_GE == 1 > [..] > # if XML_GE == 1 > [..] > # endif > [..] > #endif Spotted by Snild Dolkow, thanks! Co-authored-by: Snild Dolkow CVE: CVE-2023-52426 Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/55fecd6aa4af4a540812b81234679cd6b5714f1b] Signed-off-by: Meenali Gupta --- lib/xmlparse.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/xmlparse.c b/lib/xmlparse.c index 2d8f4c0..82a8006 100644 --- a/lib/xmlparse.c +++ b/lib/xmlparse.c @@ -6153,14 +6153,12 @@ storeEntityValue(XML_Parser parser, const ENCODING *enc, = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */ int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next); -# if XML_GE == 1 if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__, account)) { accountingOnAbort(parser); result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH; goto endEntityValue; } -# endif switch (tok) { case XML_TOK_PARAM_ENTITY_REF: -- 2.40.0