on Solaris/Intel bm_shift could be improperly allocated (bb#773)

git-svn: trunk@3554
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent 43a5497d10
commit 3ae7b3aca6
  1. 5
      ChangeLog
  2. 2
      libclamav/matcher-bm.c

@ -1,3 +1,8 @@
Mon Jan 28 16:05:29 CET 2008 (tk)
---------------------------------
* libclamav/matcher-bm.c: on Solaris/Intel bm_shift could be improperly
allocated (bb#773)
Sun Jan 27 20:09:35 CET 2008 (tk)
---------------------------------
* libclamav/cab.c: fix memory errors in new code (bb#793)

@ -95,7 +95,7 @@ int cli_bm_init(struct cli_matcher *root)
uint16_t i, size = HASH(255, 255, 255) + 1;
if(!(root->bm_shift = (uint8_t *) cli_malloc(size * sizeof(uint8_t))))
if(!(root->bm_shift = (uint8_t *) cli_calloc(size, sizeof(uint8_t))))
return CL_EMEM;
if(!(root->bm_suffix = (struct cli_bm_patt **) cli_calloc(size, sizeof(struct cli_bm_patt *)))) {

Loading…
Cancel
Save