Merge commit '710b0e27025948b7511821c2f888ff2d74a59e14'

* commit '710b0e27025948b7511821c2f888ff2d74a59e14':
  smacker: Avoid integer overflow when allocating packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/36/head
Michael Niedermayer 11 years ago
commit c16cd55593
  1. 2
      libavformat/smacker.c

@ -331,7 +331,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
}
flags >>= 1;
}
if (frame_size < 0)
if (frame_size < 0 || frame_size >= INT_MAX/2)
return AVERROR_INVALIDDATA;
if (av_new_packet(pkt, frame_size + 769))
return AVERROR(ENOMEM);

Loading…
Cancel
Save