cli_hex2int: small tweak

git-svn: trunk@1980
remotes/push_mirror/metadata
Tomasz Kojm 19 years ago
parent 3a477d9c74
commit 82d5680797
  1. 4
      clamav-devel/ChangeLog
  2. 13
      clamav-devel/libclamav/str.c

@ -1,3 +1,7 @@
Thu May 18 12:00:23 CEST 2006 (tk)
----------------------------------
* libclamav/str.c: cli_hex2int: small tweak from NJH
Tue May 16 21:15:25 BST 2006 (njh)
----------------------------------
* libclamav/mbox.c: Some HTML.Phishing.Bank-426 were getting through,

@ -34,13 +34,16 @@
static int cli_hex2int(int c)
{
int l = tolower(c);
int l;
if (!isascii(l))
if(!isascii(c))
return -1;
if (isdigit(l))
return l - '0';
if ((l >= 'a') && (l <= 'f'))
if(isdigit(c))
return c - '0';
l = tolower(c);
if((l >= 'a') && (l <= 'f'))
return l + 10 - 'a';
cli_errmsg("hex2int() translation problem (%d)\n", l);

Loading…
Cancel
Save