Skip to content
Snippets Groups Projects
Commit 4ce03a95 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

lmlm4: check packet_size against lower limit too


Fixes CID732224

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent d275f6ed
No related branches found
No related tags found
No related merge requests found
...@@ -93,8 +93,8 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) { ...@@ -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"); av_log(s, AV_LOG_ERROR, "invalid or unsupported frame_type\n");
return AVERROR(EIO); return AVERROR(EIO);
} }
if (packet_size > LMLM4_MAX_PACKET_SIZE) { if (packet_size > LMLM4_MAX_PACKET_SIZE || packet_size<=8) {
av_log(s, AV_LOG_ERROR, "packet size exceeds maximum\n"); av_log(s, AV_LOG_ERROR, "packet size %d is invalid\n", packet_size);
return AVERROR(EIO); return AVERROR(EIO);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment