12345678910111213141516171819 |
- $OpenBSD: patch-libclamav_str_c,v 1.12 2015/12/01 23:25:09 sthen Exp $
- allow for machine arch where char is unsigned by default (e.g. arm, powerpc)
- --- libclamav/str.c.orig Fri Sep 18 21:48:45 2015
- +++ libclamav/str.c Tue Dec 1 22:19:26 2015
- @@ -167,9 +167,9 @@ int cli_hex2str_to(const char *hex, char *ptr, size_t
-
- 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 {
- return -1;
- }
|