git-svn: trunk@1980
Tomasz Kojm authored on 2006/05/18 19:02:31... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Thu May 18 12:00:23 CEST 2006 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/str.c: cli_hex2int: small tweak from NJH |
|
4 |
+ |
|
1 | 5 |
Tue May 16 21:15:25 BST 2006 (njh) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav/mbox.c: Some HTML.Phishing.Bank-426 were getting through, |
... | ... |
@@ -34,13 +34,16 @@ |
34 | 34 |
|
35 | 35 |
static int cli_hex2int(int c) |
36 | 36 |
{ |
37 |
- int l = tolower(c); |
|
37 |
+ int l; |
|
38 | 38 |
|
39 |
- if (!isascii(l)) |
|
39 |
+ if(!isascii(c)) |
|
40 | 40 |
return -1; |
41 |
- if (isdigit(l)) |
|
42 |
- return l - '0'; |
|
43 |
- if ((l >= 'a') && (l <= 'f')) |
|
41 |
+ |
|
42 |
+ if(isdigit(c)) |
|
43 |
+ return c - '0'; |
|
44 |
+ |
|
45 |
+ l = tolower(c); |
|
46 |
+ if((l >= 'a') && (l <= 'f')) |
|
44 | 47 |
return l + 10 - 'a'; |
45 | 48 |
|
46 | 49 |
cli_errmsg("hex2int() translation problem (%d)\n", l); |