mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
a815ad6250
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> |
||
---|---|---|
.. | ||
bmp.c | ||
bmp.h | ||
gif.c | ||
gif.h | ||
ico.c | ||
ico.h | ||
image_cache.c | ||
image_cache.h | ||
image.c | ||
image.h | ||
jpeg.c | ||
jpeg.h | ||
Makefile | ||
nssprite.c | ||
nssprite.h | ||
png.c | ||
png.h | ||
rsvg.c | ||
rsvg.h | ||
svg.c | ||
svg.h | ||
video.c | ||
video.h |