netsurf/content/handlers/image
Sergei Rogachev a815ad6250 Fix longjmp to invalid address on jpeg init error
Libjpeg used in NetSurf for decoding of JPEG images handles exceptions using a
pair of non-local jump functions: setjmp() and longjmp(). When a decompression
context is created via a call to the function jpeg_create_decompress() the
caller passes a structure jpeg_decompress_struct as a parameter. This structure
should has a validly initialized jump buffer, so the initialization or other
functions called in future can jump to the exception handling context.

The jpeg backend of NetSurf now initializes libjpeg mistakenly: jump buffer is
filled after the call to jpeg_create_decompress(). It results in jump to random
addresses in the case of exception caught during operation of the function
jpeg_create_decompress().

The patch moves the initialization of jump buffer before the call to
jpeg_create_decompress().

Signed-off-by: Sergei Rogachev <rogachevsergei@gmail.com>
2016-08-14 22:37:12 +01:00
..
bmp.c fix bitmap modification callback calling for bmp image handler 2016-08-14 22:26:37 +01:00
bmp.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
gif.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
gif.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
ico.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
ico.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
image_cache.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
image_cache.h Update content to split public and internal API 2016-06-06 09:01:38 +01:00
image.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
image.h Update content to split public and internal API 2016-06-06 09:01:38 +01:00
jpeg.c Fix longjmp to invalid address on jpeg init error 2016-08-14 22:37:12 +01:00
jpeg.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
Makefile move the CSS content handler 2016-05-26 11:18:41 +01:00
nssprite.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
nssprite.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
png.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
png.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
rsvg.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
rsvg.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
svg.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
svg.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
video.c Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
video.h move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00