ffplay: zero initialize copy avpacket
authorJames Almer <jamrial@gmail.com>
Sat, 23 Sep 2017 23:13:58 +0000 (20:13 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 23 Sep 2017 23:13:58 +0000 (20:13 -0300)
Prevents potential use of uninitialized stack.

Signed-off-by: James Almer <jamrial@gmail.com>
ffplay.c

index 66e3673..45f2d78 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2977,7 +2977,7 @@ static int read_thread(void *arg)
         }
         if (is->queue_attachments_req) {
             if (is->video_st && is->video_st->disposition & AV_DISPOSITION_ATTACHED_PIC) {
-                AVPacket copy;
+                AVPacket copy = { 0 };
                 if ((ret = av_copy_packet(&copy, &is->video_st->attached_pic)) < 0)
                     goto fail;
                 packet_queue_put(&is->videoq, &copy);