Fix unsigned int overflow reported by UBSan (#761)
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Thu, 28 Apr 2016 11:16:43 +0000 (13:16 +0200)
committerMatthieu Darbois <mayeut@users.noreply.github.com>
Thu, 28 Apr 2016 11:16:43 +0000 (13:16 +0200)
commit29313eb5f1b2c01c7493087fa2d8f1a20495a34e
tree8692044fc432188990ac74aa0aef440321cbb12d
parente982d0396607a16ca0c373020cc93449504eb4e8
Fix unsigned int overflow reported by UBSan (#761)

* Fix unsigned int overflow reported by UBSan

Please add -DOPJ_UBSAN_BUILD to CFLAGS when building with
-fsanitize=undefined,unsigned-integer-overflow

It seems clang/gcc do not allow to disable checking for block of code
other than function or file.
src/lib/openjp2/bio.c
src/lib/openjp2/j2k.c
src/lib/openjp2/opj_includes.h
src/lib/openjp2/pi.c