[FFmpeg-devel] [PATCH] Fix ff_get_guid for short reads or errors.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jan 15 20:39:25 CET 2012

On Sun, Jan 15, 2012 at 08:19:16PM +0100, Michael Niedermayer wrote:
> On Sun, Jan 15, 2012 at 05:00:29PM +0100, Reimar Döffinger wrote:
> > Current code would just return uninitialized data with no way
> > to detect this condition.
> > Instead, fill the whole GUID with 0 in that case.
> > Fixes valgrind uninitialized data errors in fate-seek-lavf_asf.
> > 
> > Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> LGTM, thx

Actually not quite, I forgot that sizeof is unsigned, so it would
not work for straight-out read errors.
Pushed with a fix for that.
Hm, I just realized I could have used != instead of casting to int,
would that have been preferred?

More information about the ffmpeg-devel mailing list