summaryrefslogtreecommitdiff
path: root/libavformat/nistspheredec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-20 18:07:30 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-20 18:08:58 +0100
commit632fdec9f4eb80dc8301cb938bce4b470fed0c11 (patch)
tree8eeeb716ea39c623ecb38d55bcbc8505d4ceca29 /libavformat/nistspheredec.c
parent34fe125f4bc8b6fba16140517c01424cba302499 (diff)
downloadffmpeg-632fdec9f4eb80dc8301cb938bce4b470fed0c11.tar.gz
avformat/nistspheredec: initialize header_size to -1
Fixes use of uninitialized memory This also avoids the need to check the scanf() return as the subsequent check catches it Fixes: msan_uninit-mem_7f712e4dc173_7414_nist_ulaw.nist Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nistspheredec.c')
-rw-r--r--libavformat/nistspheredec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c
index 76f65ec6e0..2c96686342 100644
--- a/libavformat/nistspheredec.c
+++ b/libavformat/nistspheredec.c
@@ -36,7 +36,7 @@ static int nist_read_header(AVFormatContext *s)
{
char buffer[32], coding[32] = "pcm", format[32] = "01";
int bps = 0, be = 0;
- int32_t header_size;
+ int32_t header_size = -1;
AVStream *st;
st = avformat_new_stream(s, NULL);