You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
jpeg2000: fix null pointer dereference in case of malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -507,6 +507,7 @@ void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
|
||||
Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno;
|
||||
|
||||
for (bandno = 0; bandno < reslevel->nbands; bandno++) {
|
||||
if (reslevel->band) {
|
||||
Jpeg2000Band *band = reslevel->band + bandno;
|
||||
for (precno = 0; precno < reslevel->num_precincts_x * reslevel->num_precincts_y; precno++) {
|
||||
if (band->prec) {
|
||||
@@ -519,6 +520,7 @@ void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
|
||||
|
||||
av_freep(&band->prec);
|
||||
}
|
||||
}
|
||||
av_freep(&reslevel->band);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user