[libxml2] Use strtoul() instead of sscanf, and correct data types that break GCC.



commit b66c19612c16e1070d42ce13a444d806fd49755b
Author: Damjan Jovanovic <damjan jov gmail com>
Date:   Sun May 30 11:11:33 2021 +0200

    Use strtoul() instead of sscanf, and correct data types that break GCC.

 xmlregexp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xmlregexp.c b/xmlregexp.c
index 92bae6fb..f1366fd4 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -4999,7 +4999,7 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
                            hex_buffer[loop] = CUR;
                        }
                        hex_buffer[4] = 0;
-                       sscanf(hex_buffer, "%x", &ctxt->atom->codepoint);
+                       ctxt->atom->codepoint = (int)strtoul(hex_buffer, NULL, 16);
                        break;
                    }
                    default:


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