[FFmpeg-devel] [PATCH] avformat/aviobuf: initialize all checksum fields
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed Feb 14 14:08:04 EET 2018
2018-02-14 1:54 GMT+01:00 James Almer <jamrial at gmail.com>:
> Calling ffio_ensure_seekback() right after initializing an AVIOContext
> with ffio_init_context() would result in a use of uninitialised value.
>
> Fixes fate-adts-id3v2-demux when using valgrind.
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> Maybe we should do a memset(s, 0, sizeof(*s)) at the beginning of
> ffio_init_context() instead, to effectively initialize every field to
> zero. Which is prefered?
Imo, a memset is more readable (and I suspect it makes it
less likely a compiler does something unreasonable).
Carl Eugen
More information about the ffmpeg-devel
mailing list