check that %-quotes are followed by two hex digits

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11509 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2002-10-21 15:12:59 +00:00
parent b411502ebe
commit 6dc8410423

View File

@@ -493,7 +493,7 @@ de_http(char *buf)
{
char *p, *q;
for(p = q = buf; *p; p++, q++) {
if(*p == '%') {
if(*p == '%' && isxdigit(p[1]) && isxdigit(p[2])) {
unsigned int x;
if(sscanf(p + 1, "%2x", &x) != 1)
return -1;