Fix invalid read in pngtoimage

This commit is contained in:
mayeut 2015-10-18 19:10:31 +02:00
parent 348e96e44b
commit c0abb808f5
1 changed files with 3 additions and 1 deletions

View File

@ -3320,7 +3320,9 @@ opj_image_t *pngtoimage(const char *read_idf, opj_cparameters_t * params)
r = image->comps[0].data;
g = image->comps[1].data;
b = image->comps[2].data;
a = image->comps[3].data;
if(has_alpha) {
a = image->comps[3].data;
}
for(i = 0; i < height; ++i)
{