diff options
| author | Aleksey Sanin <aleksey@src.gnome.org> | 2002-06-14 17:07:10 +0000 |
|---|---|---|
| committer | Aleksey Sanin <aleksey@src.gnome.org> | 2002-06-14 17:07:10 +0000 |
| commit | 49cc97565fbe2928388a1e437c44429097a504ae (patch) | |
| tree | e96c37456485dd61090411351595f4fb820c73b0 /HTMLparser.c | |
| parent | e059b891efee0c1834c8a02358eb57cca6587177 (diff) | |
| download | android_external_libxml2-49cc97565fbe2928388a1e437c44429097a504ae.tar.gz android_external_libxml2-49cc97565fbe2928388a1e437c44429097a504ae.tar.bz2 android_external_libxml2-49cc97565fbe2928388a1e437c44429097a504ae.zip | |
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)
Diffstat (limited to 'HTMLparser.c')
| -rw-r--r-- | HTMLparser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/HTMLparser.c b/HTMLparser.c index 82202aa7..4a24d687 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -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 |
