Multiple off-by-one errors in the (1) jpcdeccpsetfromcox and (2) jpcdeccpsetfromrgn functions in jpc/jpc_dec.c in JasPer 1.900.1 and earlier allow remote attackers to execute arbitrary code via a crafted jp2 file, which triggers a heap-based buffer overflow.