Avoid crashes on MS-Windows when JPEG images are too large.
authorEli Zaretskii <eliz@gnu.org>
Wed, 19 Feb 2014 17:26:14 +0000 (19:26 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 19 Feb 2014 17:26:14 +0000 (19:26 +0200)
commitc021382022a9b5d1e61415f219eaa2b31a8c1a29
treecab9945d276245bf59dfc687402c8589e8627f8f
parentf097a3d25f77b08548c6d491ddf736ae3d6f58bf
Avoid crashes on MS-Windows when JPEG images are too large.

 src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
 CreateDIBSection returns an error indication, zero out *ximg after
 destroying the image.  This avoids crashes in memory allocations
 due to the fact that some of the callers also call
 x_destroy_x_image, which will attempt to free an already free'd
 block of memory.
src/ChangeLog
src/image.c