[FFmpeg-devel] [PATCH] dict.c: use av_mallocz instead of av_realloc
michaelni at gmx.at
Tue Jan 29 20:53:16 CET 2013
On Tue, Jan 29, 2013 at 11:41:10AM +0000, Paweł Hajdan, Jr wrote:
> From: "Paweł Hajdan, Jr" <phajdan at google.com>
> Memory passed to av_realloc must come from malloc,
> calloc or realloc, and not e.g. memalign. realloc(3):
> The realloc() function changes the size of the memory block pointed to
> by ptr to size bytes. (...) Unless ptr is NULL, it must have been
> returned by an earlier call to malloc(), calloc() or realloc().
> The issue has been found by debugallocation, a part of google-perftools:
> http://code.google.com/p/gperftools/ .
> This makes fate pass when using LD_PRELOAD-ed debugallocation.
> See also earlier discussion
> Signed-off-by: Paweł Hajdan, Jr <phajdan at google.com>
> libavutil/dict.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel