Browse code

fix bounds error

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@606 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/06/13 04:16:12
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Jun 12 21:08:55 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav: mspack: fix bounds error (found by Nigel). Original author
4
+		       contacted.
5
+
1 6
 Sat Jun 12 19:21:44 CEST 2004 (tk)
2 7
 ----------------------------------
3 8
   * shared/cfgparser: freecfg: fix loop when some directives are doubled in
... ...
@@ -359,7 +359,8 @@ static void lzxd_static_init() {
359 359
 
360 360
   for (i = 0, j = 0; i < 51; i += 2) {
361 361
     extra_bits[i]   = j; /* 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7... */
362
-    extra_bits[i+1] = j;
362
+    if(i < 50)
363
+	extra_bits[i+1] = j;
363 364
     if ((i != 0) && (j < 17)) j++; /* 0,0,1,2,3,4...15,16,17,17,17,17... */
364 365
   }
365 366
 
... ...
@@ -544,7 +544,7 @@ static void ole2_walk_property_tree(int fd, ole2_header_t *hdr, const char *dir,
544 544
 			free(dirname);
545 545
 			break;
546 546
 		default:
547
-			cli_errmsg("ERROR: unknown OLE2 entry type: %d\n", prop_block[index].type);
547
+			cli_dbgmsg("ERROR: unknown OLE2 entry type: %d\n", prop_block[index].type);
548 548
 			break;
549 549
 	}
550 550
 	return;