From 80bd34c3c650bd68e3c9c3e2308ac1988067ad50 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Mon, 22 Aug 2022 14:06:37 +0200 Subject: [PATCH] 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)); }