projects
/
collection4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72f42f3
)
src/utils_cgi.c: uri_unescape_copy: Fix a potential buffer overflow.
author
Florian Forster
<ff@octo.it>
Mon, 12 Jul 2010 07:56:02 +0000
(09:56 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 12 Jul 2010 07:56:02 +0000
(09:56 +0200)
src/utils_cgi.c
patch
|
blob
|
history
diff --git
a/src/utils_cgi.c
b/src/utils_cgi.c
index
f4abec2
..
7c01bd9
100644
(file)
--- a/
src/utils_cgi.c
+++ b/
src/utils_cgi.c
@@
-104,6
+104,7
@@
static char *uri_unescape_copy (char *dest, const char *src, size_t n) /* {{{ */
*dest_ptr = *src_ptr;
}
+ n--;
src_ptr++;
dest_ptr++;
*dest_ptr = 0;
@@
-111,7
+112,7
@@
static char *uri_unescape_copy (char *dest, const char *src, size_t n) /* {{{ */
assert (*dest_ptr == 0);
return (dest);
-} /* }}} char *uri_unescape */
+} /* }}} char *uri_unescape
_copy
*/
static char *uri_unescape (const char *string) /* {{{ */
{