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:
ea6da80
)
lavf/pcm: check size, do not produce invalid packets
author
Paul B Mahol
<onemda@gmail.com>
Fri, 7 Dec 2012 13:05:43 +0000
(13:05 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Fri, 7 Dec 2012 13:05:43 +0000
(13:05 +0000)
Inspired by
92b8c9d89e7ae86bffa05393bb230d5a165b0148
.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/pcm.c
patch
|
blob
|
history
diff --git
a/libavformat/pcm.c
b/libavformat/pcm.c
index
71f6a4f
..
2fe44dc
100644
(file)
--- a/
libavformat/pcm.c
+++ b/
libavformat/pcm.c
@@
-30,6
+30,8
@@
int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
int ret, size;
size= RAW_SAMPLES*s->streams[0]->codec->block_align;
+ if (size <= 0)
+ return AVERROR(EINVAL);
ret= av_get_packet(s->pb, pkt, size);