implementation of the is_bilevel() method could leave the fetched
colors uninitialized. Added a return value check.
+ - a numeric combining mode of 13 (eg. as a parameter to
+ Imager::Fill->new())could cause an invalid array read in
+ i_get_combine() due to a fencepost error in validating the combine
+ number.
+
Imager 1.008 - 31 Dec 2018
============
void i_get_combine(int combine, i_fill_combine_f *color_func,
i_fill_combinef_f *fcolor_func) {
- if (combine < 0 || combine > sizeof(combines_8) / sizeof(*combines_8))
+ if (combine < 0 || combine >= sizeof(combines_8) / sizeof(*combines_8))
combine = 0;
*color_func = combines_8[combine];