On Mon, 4 Aug 2014, Felix Abecassis wrote:
Fix access to uninitialized memory on a side data of type STEREO3D. --- libavutil/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/libavutil/frame.c b/libavutil/frame.c index 4b44075..0e7fd07 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -464,7 +464,7 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame, if (!ret) return NULL; - ret->data = av_malloc(size); + ret->data = av_mallocz(size); if (!ret->data) { av_freep(&ret); return NULL; -- 1.9.1
I think we rather should make sure we really initialize all of the side data in the case of STEREO3D - then it's easier to spot missed initialization of other side data types, while this patch would hide other such issues.
OTOH, implicitly initializing all frame side data might be a useful detail (and could be regarded as a safety fallback - if someone misses to initialize something it will at least behave consistently).
Anton? // Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
