projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ff8de7
)
Check sub_packet_size against 0 to avoid div by zero later.
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 29 Oct 2008 00:16:50 +0000
(
00:16
+0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 29 Oct 2008 00:16:50 +0000
(
00:16
+0000)
Fixes issue473
Originally committed as revision 15739 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/rmdec.c
patch
|
blob
|
history
diff --git
a/libavformat/rmdec.c
b/libavformat/rmdec.c
index
8442957
..
9db09e1
100644
(file)
--- a/
libavformat/rmdec.c
+++ b/
libavformat/rmdec.c
@@
-138,6
+138,11
@@
static int rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,
return -1;
}
+ if(sub_packet_size <= 0){
+ av_log(s, AV_LOG_ERROR, "sub_packet_size is invalid\n");
+ return -1;
+ }
+
if (!strcmp(buf, "cook")) st->codec->codec_id = CODEC_ID_COOK;
else if (!strcmp(buf, "sipr")) st->codec->codec_id = CODEC_ID_SIPR;
else st->codec->codec_id = CODEC_ID_ATRAC3;