Files
libxml2/libxml2-python3-string-null-check.patch
Petr Gajdos 433d883e3a Accepting request 1302350 from home:pgajdos:libxml2
- version update to 2.14.5
  2.14.0
  ** Major changes **
  o The HTML tokenizer now conforms fully to HTML5.
  o Binary compatibility is restricted to versions 2.14 or newer.
    The soname was bumped from libxml2.so.2 to libxml2.so.16.
  o The serialization API will now take user-provided or default
    encodings into account when serializing attribute values.
  o The XML parser won't try to merge consecutive CDATA sections
    as before to align with web standards.
  o Support for RELAX NG can now be disabled with a new configuration
    option independently of XML Schemas support.
  o The "legacy" configuration option won't enable support for HTTP
    and LZMA anymore. 
  o Parts of the xmllint executable were refactored, allowing the
    combination of more options.
  o Meson is fully supported now.
  o Parts of the buffering code were reworked and simplified.
  o Overflow checks before reallocations were hardenend.
  o Some unprefixed symbols were renamed to avoid namespace pollution.
  ** New features **
  o Input callbacks can now be set on a parser context and an improved
    API to create parser input is available.
  o The following new functions, taking a parser input object, were added:
    . xmlCtxtParseDocument
    . xmlCtxtParseContent
    . xmlCtxtParseDtd
  o The xmlSave API now has additional options to replace global settings.
  o Parser options XML_PARSE_UNZIP, XML_PARSE_NO_SYS_CATALOG and
    XML_PARSE_CATALOG_PI were added.

OBS-URL: https://build.opensuse.org/request/show/1302350
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=252
2025-09-09 08:15:17 +00:00

29 lines
937 B
Diff

From 07b1c4c8a736a31ac4b8ae13ea25d50793dfea83 Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@alum.wpi.edu>
Date: Fri, 25 Jan 2019 12:55:52 -0600
Subject: [PATCH] python: return None if PY_IMPORT_STRING returns NULL
PY_IMPORT_STRING might return NULL on python 3 if, ie, a string can't be
encoded. We should check for this and return None, rather than returning
NULL. Fixes a NULL pointer dereference when reporting an error with an
invalid string.
---
python/types.c | 4 ++++
1 file changed, 4 insertions(+)
Index: libxml2-2.14.5/python/types.c
===================================================================
--- libxml2-2.14.5.orig/python/types.c
+++ libxml2-2.14.5/python/types.c
@@ -275,6 +275,10 @@ libxml_charPtrConstWrap(const char *str)
return (Py_None);
}
ret = PY_IMPORT_STRING(str);
+ if (ret == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
return (ret);
}