mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
replaced sprintf() with snprintf() to prevent possible buffer overflow
* DOCBparser.c HTMLparser.c debugXML.c encoding.c nanoftp.c nanohttp.c parser.c tree.c uri.c xmlIO.c xmllint.c xpath.c: replaced sprintf() with snprintf() to prevent possible buffer overflow (the bug was pointed out by Anju Premachandran)
This commit is contained in:
@ -1572,7 +1572,7 @@ htmlEncodeEntities(unsigned char* out, int *outlen,
|
||||
*/
|
||||
ent = htmlEntityValueLookup(c);
|
||||
if (ent == NULL) {
|
||||
sprintf(nbuf, "#%u", c);
|
||||
snprintf(nbuf, sizeof(nbuf), "#%u", c);
|
||||
cp = nbuf;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user