Skip to content
Permalink
Browse files Browse the repository at this point in the history
reject broken/crafted NOKIARAW files
  • Loading branch information
alextutubalin committed Jun 11, 2018
1 parent 1334647 commit 1d8d1b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dcraw/dcraw.c
Expand Up @@ -15738,7 +15738,10 @@ void CLASS identify()
#endif
switch (tiff_bps = i*8 / (width * height)) {
case 8: load_raw = &CLASS eight_bit_load_raw; break;
case 10: load_raw = &CLASS nokia_load_raw;
case 10: load_raw = &CLASS nokia_load_raw; break;
#ifdef LIBRAW_LIBRARY_BUILD
case 0: throw LIBRAW_EXCEPTION_IO_CORRUPT; break;
#endif
}
raw_height = height + (top_margin = i / (width * tiff_bps/8) - height);
mask[0][3] = 1;
Expand Down
5 changes: 4 additions & 1 deletion internal/dcraw_common.cpp
Expand Up @@ -14399,7 +14399,10 @@ void CLASS identify()
#endif
switch (tiff_bps = i*8 / (width * height)) {
case 8: load_raw = &CLASS eight_bit_load_raw; break;
case 10: load_raw = &CLASS nokia_load_raw;
case 10: load_raw = &CLASS nokia_load_raw; break;
#ifdef LIBRAW_LIBRARY_BUILD
case 0: throw LIBRAW_EXCEPTION_IO_CORRUPT; break;
#endif
}
raw_height = height + (top_margin = i / (width * tiff_bps/8) - height);
mask[0][3] = 1;
Expand Down

0 comments on commit 1d8d1b4

Please sign in to comment.