OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2303b45
)
avformat/adxdec: dont return random data on EOF
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 7 Jan 2014 15:05:56 +0000
(16:05 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 7 Jan 2014 15:05:56 +0000
(16:05 +0100)
Fixes use of uninitialized memory
Partly fixes; msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/adxdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/adxdec.c
b/libavcodec/adxdec.c
index
e59cc92
..
ec33e73
100644
(file)
--- a/
libavcodec/adxdec.c
+++ b/
libavcodec/adxdec.c
@@
-157,9
+157,11
@@
static int adx_decode_frame(AVCodecContext *avctx, void *data,
buf_size -= BLOCK_SIZE;
buf += BLOCK_SIZE;
}
- samples_offset += BLOCK_SAMPLES;
+ if (!c->eof)
+ samples_offset += BLOCK_SAMPLES;
}
+ frame->nb_samples = samples_offset;
*got_frame_ptr = 1;
return buf - avpkt->data;