fixed a bug in jp2_read_ihdr (need to allocate jp2->comps)
This commit is contained in:
parent
f8d899c4f1
commit
197b0505cb
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
January 19, 2006
|
||||||
|
* [Herve Drolon] fixed a bug in jp2_read_ihdr (need to allocate jp2->comps)
|
||||||
|
|
||||||
January 18, 2006
|
January 18, 2006
|
||||||
* [Herve Drolon] changed the name of j2k_realloc to opj_realloc
|
* [Herve Drolon] changed the name of j2k_realloc to opj_realloc
|
||||||
* [Herve Drolon] fixed a bug in opj_cio_open when saving 48-bit images (wrong buffer size calculation)
|
* [Herve Drolon] fixed a bug in opj_cio_open when saving 48-bit images (wrong buffer size calculation)
|
||||||
|
|
|
@ -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->h = cio_read(cio, 4); /* HEIGHT */
|
||||||
jp2->w = cio_read(cio, 4); /* WIDTH */
|
jp2->w = cio_read(cio, 4); /* WIDTH */
|
||||||
jp2->numcomps = cio_read(cio, 2); /* NC */
|
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 */
|
jp2->bpc = cio_read(cio, 1); /* BPC */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue