Reading the attached file (generated by a fuzzer) triggers a SIGFPE in :
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff2c2e28b in opj_int_ceildiv (a=0, b=0) at
/home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/opj_intmath.h:
105
105 return (a + b - 1) / b;
(gdb) bt
#0 0x00007ffff2c2e28b in opj_int_ceildiv (a=0, b=0) at
/home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/opj_intmath.h:
105
#1 0x00007ffff2c2e721 in opj_image_comp_header_update
(p_image_header=0x654670, p_cp=0x651c40) at
/home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/image.c:116
#2 0x00007ffff2c311b0 in opj_j2k_read_siz (p_j2k=0x651bd0,
p_header_data=0x653367 "", p_header_size=39, p_manager=0x63d5c8)
at /home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/j2k.c:2167
#3 0x00007ffff2c3affc in opj_j2k_read_header_procedure (p_j2k=0x651bd0,
p_stream=0x6541e0, p_manager=0x63d5c8)
at /home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/j2k.c:6579
#4 0x00007ffff2c3b26c in opj_j2k_exec (p_j2k=0x651bd0,
p_procedure_list=0x63d500, p_stream=0x6541e0, p_manager=0x63d5c8)
at /home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/j2k.c:6634
#5 0x00007ffff2c39ff1 in opj_j2k_read_header (p_stream=0x6541e0,
p_j2k=0x651bd0, p_image=0x7fffffff1850, p_manager=0x63d5c8)
at /home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/j2k.c:6166
#6 0x00007ffff2c470bd in opj_jp2_read_header (p_stream=0x6541e0, jp2=0x651b10,
p_image=0x7fffffff1850, p_manager=0x63d5c8)
at /home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/jp2.c:2131
#7 0x00007ffff2c4a168 in opj_read_header (p_stream=0x6541e0, p_codec=0x63d570,
p_image=0x7fffffff1850)
at /home/even/gdal/openjpeg/r2093/openjpeg-read-only/src/lib/openjp2/openjpeg.c:505
#8 0x00007ffff6f958ec in JP2OpenJPEGDataset::Open (poOpenInfo=0x7fffffff3a20)
at openjpegdataset.cpp:1024
#9 0x00007ffff71168fa in GDALOpenInternal (oOpenInfo=<value optimized out>,
papszAllowedDrivers=0x0) at gdaldataset.cpp:2251
#10 0x00007ffff7116dbb in GDALOpenInternal (pszFilename=<value optimized out>,
eAccess=<value optimized out>, papszAllowedDrivers=0x0) at gdaldataset.cpp:2209
#11 0x00000000004033a3 in main (argc=2, argv=0x650e80) at gdalinfo.c:173
Original issue reported on code.google.com by even.rou...@gmail.com on 18 Nov 2012 at 1:00
Original issue reported on code.google.com by
even.rou...@gmail.com
on 18 Nov 2012 at 1:00Attachments: