fixed a bug in jp2_read_ihdr (need to allocate jp2->comps)

This commit is contained in:
Freeimage
2006-01-19 20:25:44 +00:00
parent f8d899c4f1
commit 197b0505cb
2 changed files with 4 additions and 0 deletions

View File

@@ -161,6 +161,7 @@ static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) {
jp2->h = cio_read(cio, 4); /* HEIGHT */
jp2->w = cio_read(cio, 4); /* WIDTH */
jp2->numcomps = cio_read(cio, 2); /* NC */
jp2->comps = (opj_jp2_comps_t*) opj_malloc(jp2->numcomps * sizeof(opj_jp2_comps_t));
jp2->bpc = cio_read(cio, 1); /* BPC */