git-svn: trunk@4900
aCaB authored on 2009/03/06 00:45:25... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Thu Mar 5 16:43:46 CET 2009 (acab) |
|
2 |
+----------------------------------- |
|
3 |
+ * libclamav/mpool.c: enable mmap poisoning (compile with --enable-debug) |
|
4 |
+ |
|
1 | 5 |
Wed Mar 4 21:05:57 EET 2009 (edwin) |
2 | 6 |
------------------------------------ |
3 | 7 |
* configure, configure.in: LDFLAGS is LDFLAGS, not LIBS. This fixes |
... | ... |
@@ -521,8 +521,7 @@ void mpool_free(struct MP *mp, void *ptr) { |
521 | 521 |
|
522 | 522 |
#ifdef CL_DEBUG |
523 | 523 |
assert(f->magic == MPOOLMAGIC && "Attempt to mpool_free a pointer we did not allocate!"); |
524 |
- /* FIXME: this fux it up */ |
|
525 |
- /* memset(&f->fake, FREEPOISON, from_bits(f->u.sbits)); */ |
|
524 |
+ memset(ptr, FREEPOISON, from_bits(f->u.sbits) - FRAG_OVERHEAD); |
|
526 | 525 |
#endif |
527 | 526 |
|
528 | 527 |
sbits = f->u.sbits; |