[FFmpeg-cvslog] lmlm4: check packet_size against lower limit too
Michael Niedermayer
git at videolan.org
Tue Mar 19 16:41:20 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 19 16:30:44 2013 +0100| [4ce03a95e27d618a2c65b1ed134a72b48bbbff00] | committer: Michael Niedermayer
lmlm4: check packet_size against lower limit too
Fixes CID732224
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ce03a95e27d618a2c65b1ed134a72b48bbbff00
---
libavformat/lmlm4.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index 29ee2a3..c8ea421 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -93,8 +93,8 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) {
av_log(s, AV_LOG_ERROR, "invalid or unsupported frame_type\n");
return AVERROR(EIO);
}
- if (packet_size > LMLM4_MAX_PACKET_SIZE) {
- av_log(s, AV_LOG_ERROR, "packet size exceeds maximum\n");
+ if (packet_size > LMLM4_MAX_PACKET_SIZE || packet_size<=8) {
+ av_log(s, AV_LOG_ERROR, "packet size %d is invalid\n", packet_size);
return AVERROR(EIO);
}
More information about the ffmpeg-cvslog
mailing list