mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
autogenerate a minimal NULL value sequence for unknown pointer types This
* gentest.py testapi.c: autogenerate a minimal NULL value sequence for unknown pointer types * HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c xpointer.c: This uncovered an impressive amount of entry points not checking for NULL pointers when they ought to, closing all the open gaps. Daniel
This commit is contained in:
@@ -745,7 +745,8 @@ xmlGetUTF8Char(const unsigned char *utf, int *len) {
|
||||
return(c);
|
||||
|
||||
error:
|
||||
*len = 0;
|
||||
if (len != NULL)
|
||||
*len = 0;
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -768,6 +769,8 @@ xmlCheckUTF8(const unsigned char *utf)
|
||||
int ix;
|
||||
unsigned char c;
|
||||
|
||||
if (utf == NULL)
|
||||
return(0);
|
||||
/*
|
||||
* utf is a string of 1, 2, 3 or 4 bytes. The valid strings
|
||||
* are as follows (in "bit format"):
|
||||
|
Reference in New Issue
Block a user