Unidiff1 files changed, 5 insertions, 4 deletions
|
diff --git a/html.c b/html.c index 66ba65d..d86b2c1 100644 --- a/ html.c+++ b/ html.c |
|
@@ -242,4 +242,5 @@ char *convert_query_hexchar(char *txt) |
242 | { |
242 | { |
243 | int d1, d2; |
243 | int d1, d2, n; |
244 | if (strlen(txt) < 3) { |
244 | n = strlen(txt); |
| |
245 | if (n < 3) { |
245 | *txt = '\0'; |
246 | *txt = '\0'; |
@@ -250,3 +251,3 @@ char *convert_query_hexchar(char *txt) |
250 | if (d1<0 || d2<0) { |
251 | if (d1<0 || d2<0) { |
251 | strcpy(txt, txt+3); |
252 | memmove(txt, txt+3, n-3); |
252 | return txt-1; |
253 | return txt-1; |
@@ -254,3 +255,3 @@ char *convert_query_hexchar(char *txt) |
254 | *txt = d1 * 16 + d2; |
255 | *txt = d1 * 16 + d2; |
255 | strcpy(txt+1, txt+3); |
256 | memmove(txt+1, txt+3, n-2); |
256 | return txt; |
257 | return txt; |
|