[libxslt] Make xsltCompileRelativePathPattern non-recursive



commit 8dc0b5dba3c42954c1da88d4d1c8891a99111247
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Sep 30 10:04:32 2019 +0200

    Make xsltCompileRelativePathPattern non-recursive
    
    Fixes a potential call stack overflow.
    
    Found by OSS-Fuzz.

 libxslt/pattern.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
index c448beec..bf8207ed 100644
--- a/libxslt/pattern.c
+++ b/libxslt/pattern.c
@@ -1808,9 +1808,7 @@ xsltCompileRelativePathPattern(xsltParserContextPtr ctxt, xmlChar *token, int no
            PUSH(XSLT_OP_PARENT, NULL, NULL, novar);
            NEXT;
            SKIP_BLANKS;
-           if ((CUR != 0) && (CUR != '|')) {
-               xsltCompileRelativePathPattern(ctxt, NULL, novar);
-           }
+           xsltCompileStepPattern(ctxt, NULL, novar);
        } else {
            ctxt->error = 1;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]