Revision eb60dddc libavcodec/mjpeg.c

View differences:

libavcodec/mjpeg.c
1599 1599
static int mjpeg_decode_com(MJpegDecodeContext *s)
1600 1600
{
1601 1601
    /* XXX: verify len field validity */
1602
    unsigned int len = get_bits(&s->gb, 16);
1602
    int len = get_bits(&s->gb, 16);
1603 1603
    if (len >= 2 && len < 32768) {
1604 1604
	/* XXX: any better upper bound */
1605 1605
	uint8_t *cbuf = av_malloc(len - 1);

Also available in: Unified diff