[trunk] fixed compression check for 1 bit unsigned component (fixes issue 457)

This commit is contained in:
Matthieu Darbois 2014-12-22 15:00:12 +00:00
parent 16240e21f9
commit bde5ba6ae8

View File

@ -1969,7 +1969,7 @@ OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2,
l_is_valid &= (jp2->w > 0);
/* precision */
for (i = 0; i < jp2->numcomps; ++i) {
l_is_valid &= (jp2->comps[i].bpcc > 0);
l_is_valid &= ((jp2->comps[i].bpcc & 0x7FU) < 38U); /* 0 is valid, ignore sign for check */
}
/* METH */