Copy link
@mayeut

mayeut Sep 8, 2016

Author Collaborator

The latter. It might need a comment in source code to clarify that information though: https://github.com/uclouvain/openjpeg/blob/master/src/lib/openjp2/j2k.c#L2546
If this wasn't the case we would need an overflow check on the addition as well because on x86, SIZE_MAX == UINT32_MAX