mjpegdec: rgb mode is specific for ljpeg, disable it for others.
Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
73abc3a634
commit
4ade824e1f
@ -300,6 +300,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
|
||||
if (s->v_max == 1 && s->h_max == 1 && s->lossless==1 && nb_components==3)
|
||||
s->rgb = 1;
|
||||
else if (!s->lossless)
|
||||
s->rgb = 0;
|
||||
|
||||
/* if different size, realloc/alloc picture */
|
||||
if ( width != s->width || height != s->height
|
||||
|
Loading…
x
Reference in New Issue
Block a user