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 /uri.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 'uri.c')
-rw-r--r-- | uri.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -372,7 +372,7 @@ xmlSaveUri(xmlURIPtr uri) { return(NULL); } } - len += sprintf((char *) &ret[len], ":%d", uri->port); + len += snprintf((char *) &ret[len], max - len, ":%d", uri->port); } } else if (uri->authority != NULL) { if (len + 3 >= max) { |