From 17d9fe35e40e1f36144bd98d2b40aa98c8dae544 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 26 May 2008 06:44:34 +0000 Subject: [PATCH] - an optimization skipping 0 src alpha values could cause the rubthrough() to read past the end of a buffer. http://www.nntp.perl.org/group/perl.cpan.testers/2008/05/msg1509184.html --- Changes | 9 +++++++++ rubthru.im | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 22d520c3..3c7bfa7e 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,14 @@ Imager release history. Older releases can be found in Changes.old +Imager 0.66 - unreleased +=========== + +Bug fixes: + + - an optimization skipping 0 src alpha values could cause the + rubthrough() to read past the end of a buffer. + http://www.nntp.perl.org/group/perl.cpan.testers/2008/05/msg1509184.html + Imager 0.65 - 20 May 2008 =========== diff --git a/rubthru.im b/rubthru.im index 4c3b08e7..d5ff2267 100644 --- a/rubthru.im +++ b/rubthru.im @@ -121,7 +121,7 @@ rubthru_targ_alpha(i_img *im, i_img *src, int tx, int ty, ttx = work_left; IM_GLIN(im, work_left, work_left + work_width, tty, dest_line); - for(x = src_minx; x < src_maxx; x++) { + for(x = min_x; x < max_x; x++) { src_alpha = srcp->channel[alphachan]; if (src_alpha) { remains = IM_SAMPLE_MAX - src_alpha; -- 2.30.2