Skip to content

Commit

Permalink
avcodec/avpacket: clear priv in av_init_packet()
Browse files Browse the repository at this point in the history
This should fix leaving uninitialized pointers in priv which can confuse
user applications.
See: golang/go#14426

Only or release branches

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
  • Loading branch information
michaelni committed Apr 29, 2016
1 parent b6d9ecf commit 97da8f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libavcodec/avpacket.c
Expand Up @@ -58,6 +58,7 @@ void av_init_packet(AVPacket *pkt)
#if FF_API_DESTRUCT_PACKET
FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
pkt->priv = NULL;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
Expand Down

0 comments on commit 97da8f4

Please sign in to comment.