mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-04-01 10:50:08 +03:00
Add NULL checks
Short-lived regression.
This commit is contained in:
parent
4e93425a7f
commit
5862e9dd37
4
buf.c
4
buf.c
@ -558,7 +558,7 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, size_t len) {
|
||||
/**
|
||||
* xmlBufCat:
|
||||
* @buf: the buffer to add to
|
||||
* @str: the #xmlChar string
|
||||
* @str: the #xmlChar string (optional)
|
||||
*
|
||||
* Append a zero terminated string to an XML buffer.
|
||||
*
|
||||
@ -567,6 +567,8 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, size_t len) {
|
||||
*/
|
||||
int
|
||||
xmlBufCat(xmlBufPtr buf, const xmlChar *str) {
|
||||
if (str == NULL)
|
||||
return(0);
|
||||
return(xmlBufAdd(buf, str, strlen((const char *) str)));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user