talloc: Fix write behind memory block
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Sat, 5 Dec 2009 19:44:15 +0000 (21:44 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 21 Dec 2009 09:55:02 +0000 (10:55 +0100)
commita498121bdb5a0a77a5012a66c384640028b6d931
treea1db863ca8255dbd95625e32d68b9fed05157400
parent2b0f402f113bd51ce8bdae6062af0533d3b44b49
talloc: Fix write behind memory block

If ALWASY_REALLOC is defined and we are to 'shrink' memory block,
memcpy() will write outside memory just allocated.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
(cherry picked from commit 8efabcc8a5dcd83deed8ef8e17826a1d347e6d83)
(cherry picked from commit dd38f159860bc3d7a454992ce56ea3500e81aed4)
lib/talloc/talloc.c