mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
string: Fix xmlStrncatNew(NULL, "")
This should return "" not NULL.
This commit is contained in:
@@ -499,10 +499,10 @@ xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
|
||||
if (len < 0)
|
||||
return(NULL);
|
||||
}
|
||||
if ((str2 == NULL) || (len == 0))
|
||||
return(xmlStrdup(str1));
|
||||
if (str1 == NULL)
|
||||
return(xmlStrndup(str2, len));
|
||||
if ((str2 == NULL) || (len == 0))
|
||||
return(xmlStrdup(str1));
|
||||
|
||||
size = xmlStrlen(str1);
|
||||
if ((size < 0) || (size > INT_MAX - len))
|
||||
|
||||
Reference in New Issue
Block a user