diff options
| author | Eric Harvey <71228603+Eharve14@users.noreply.github.com> | 2022-01-18 15:55:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 21:55:10 +0100 |
| commit | 241e9e8efeb6750ef4202a61b3a436628e4f6d23 (patch) | |
| tree | 9a38bc9eb12cc5aa485f0ecec940c9fff3e7d341 /src/lib/openjp2/jp2.c | |
| parent | d87fd9279a9e0f8ce8fb23ab10e536410a907336 (diff) | |
Fix potential overflow related issues spotted by LGTM code analysis (#1402)
Diffstat (limited to 'src/lib/openjp2/jp2.c')
| -rw-r--r-- | src/lib/openjp2/jp2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c index 63a3a1a2..449440b8 100644 --- a/src/lib/openjp2/jp2.c +++ b/src/lib/openjp2/jp2.c @@ -1136,9 +1136,9 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image, } max = image->numcomps; - for (i = 0; i < max; ++i) { - if (old_comps[i].data) { - opj_image_data_free(old_comps[i].data); + for (j = 0; j < max; ++j) { + if (old_comps[j].data) { + opj_image_data_free(old_comps[j].data); } } |
