Fixes: NULL pointer dereference
Found-by: Oguzhan Akkaya with AFL++ fuzzing (May 2026)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit
6631bbc5d47082a6212e3c82fce0215fce2dbac6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
memset(s->qntsty, 0, sizeof(s->qntsty));
memset(s->properties, 0, sizeof(s->properties));
memset(&s->poc , 0, sizeof(s->poc));
+ memset(s->roi_shift, 0, sizeof(s->roi_shift));
s->numXtiles = s->numYtiles = 0;
s->ncomponents = 0;
+ s->has_ppm = 0;
+ s->isHT = 0;
+ s->precision = 0;
+ s->colour_space = 0;
+ s->pal8 = 0;
}
static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)