[libxml2] Don't initialize SAX handler in htmlReadMemory



commit 80bd34c3c650bd68e3c9c3e2308ac1988067ad50
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Aug 22 14:06:37 2022 +0200

    Don't initialize SAX handler in htmlReadMemory
    
    The SAX handler is already initialized when creating the parser
    context.

 HTMLparser.c | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index 2aeb7794..4d2a343e 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -6995,9 +6995,6 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi
     ctxt = htmlCreateMemoryParserCtxt(buffer, size);
     if (ctxt == NULL)
         return (NULL);
-    htmlDefaultSAXHandlerInit();
-    if (ctxt->sax != NULL)
-        memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
     return (htmlDoRead(ctxt, URL, encoding, options, 0));
 }
 


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