[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f

edwin edwin at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f016d7034e107a716400831a1776d4091c222348
Author: edwin <edwin at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date:   Fri Apr 17 13:45:12 2009 +0000

    fix mpool_realloc to work with shrinked sizes. This is not yet used anywhere.
    
    git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5045 77e5149b-7576-45b1-b177-96237e5ba77b

diff --git a/ChangeLog b/ChangeLog
index be9926b..4577567 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 17 16:44:33 EEST 2009 (edwin)
+-------------------------------------
+ * libclamav/mpool.c: fix mpool_realloc to work with shrinked sizes.
+ This is not yet used anywhere.
+
 Fri Apr 17 00:59:48 CEST 2009 (acab)
 ------------------------------------
  * clamav-milter/clamfi.c: try harder not to break DKIM when AddHeader=Add
diff --git a/libclamav/mpool.c b/libclamav/mpool.c
index e5a9bd9..118f6a9 100644
--- a/libclamav/mpool.c
+++ b/libclamav/mpool.c
@@ -556,7 +556,7 @@ void *mpool_realloc(struct MP *mp, void *ptr, size_t size) {
     return ptr;
   if (!(new_ptr = mpool_malloc(mp, size)))
     return NULL;
-  memcpy(new_ptr, ptr, csize);
+  memcpy(new_ptr, ptr, csize <= size ? csize : size);
   mpool_free(mp, ptr);
   return new_ptr;
 }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list