openbsd-ports/security/clamav/patches/patch-libclamav_str_c
mbalmer e2e2236f4d Update ClamAV to version 0.91.2.
Note to -stable ports maintainers:  This should probably be put into -stable
since the ClamAV people do not provide virus data to outdated scan engines.

ok simon
2007-08-25 10:08:28 +00:00

27 lines
689 B
Plaintext

$OpenBSD: patch-libclamav_str_c,v 1.3 2007/08/25 10:08:28 mbalmer Exp $
--- libclamav/str.c.orig Sat Apr 28 19:28:23 2007
+++ libclamav/str.c Sat Aug 25 09:35:06 2007
@@ -123,8 +123,8 @@ uint16_t *cli_hex2ui(const char *hex)
char *cli_hex2str(const char *hex)
{
- char *str, *ptr, val, c;
- int i, len;
+ char *str, *ptr, val;
+ int c, i, len;
len = strlen(hex);
@@ -142,9 +142,9 @@ char *cli_hex2str(const char *hex)
for(i = 0; i < len; i += 2) {
if((c = cli_hex2int(hex[i])) >= 0) {
- val = c;
+ val = (char)c;
if((c = cli_hex2int(hex[i+1])) >= 0) {
- val = (val << 4) + c;
+ val = (val << 4) + (char)c;
} else {
free(str);
return NULL;