Fix incorrect images when cropping without stretch.
authorCarl Hetherington <cth@carlh.net>
Mon, 4 Nov 2019 15:38:14 +0000 (16:38 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 16 Nov 2019 21:46:39 +0000 (22:46 +0100)
commited4fc06db6957b2b63b2400a737f47c18a1003be
treee429ffc3df79e141dacb870ffe9d232e8b72efd4
parent81e40e7b915a55f8e5aa2db34ad809552b1534e3
Fix incorrect images when cropping without stretch.
Always overallocate images so that Image::crop_scale_window is always
safe from over-reading buffers.  Relates to #1654 and probably #1653.

Backported from 7b0372776ac4da6a8e4ff29f41a4f08b9b4de506 in v2.15.x.
src/lib/image.cc
src/lib/image.h
src/lib/j2k_image_proxy.cc
test/image_test.cc
test/test.cc
test/test.h