libclamav/mpool.c: fix inconsistency in cli_mpool_hex2str

pull/1/head
David Raynor 12 years ago
parent 1aa13093ad
commit 5fc6e404ae
  1. 4
      libclamav/mpool.c

@ -744,13 +744,13 @@ unsigned char *cli_mpool_hex2str(mpool_t *mp, const char *hex) {
size_t len = strlen((const char*)hex);
if (len&1) {
cli_errmsg("cli_hex2str(): Malformed hexstring: %s (length: %u)\n", hex, (unsigned)len);
cli_errmsg("cli_hex2str(): Malformed hexstring: %s (length: %lu)\n", hex, (unsigned long)len);
return NULL;
}
str = mpool_malloc(mp, (len/2) + 1);
if (str == NULL) { /* oops, we have a memory pool allocation failure */
cli_errmsg("cli_mpool_hex2str(): Can't allocate memory (%lu bytes).\n", (unsigned int)(len/2 + 1));
cli_errmsg("cli_mpool_hex2str(): Can't allocate memory (%lu bytes).\n", (unsigned long)(len/2 + 1));
return NULL;
}
if (cli_hex2str_to(hex, (char*)str, len) == -1) {

Loading…
Cancel
Save