- an optimization skipping 0 src alpha values could cause the
authorTony Cook <tony@develop=help.com>
Mon, 26 May 2008 06:44:34 +0000 (06:44 +0000)
committerTony Cook <tony@develop=help.com>
Mon, 26 May 2008 06:44:34 +0000 (06:44 +0000)
   rubthrough() to read past the end of a buffer.
   http://www.nntp.perl.org/group/perl.cpan.testers/2008/05/msg1509184.html

Changes
rubthru.im

diff --git a/Changes b/Changes
index 22d520c3f0506b21cebb897dbf78bed854aae471..3c7bfa7e6924ad3f650c5bb7c2c36eb6d064b279 100644 (file)
--- 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
 ===========
 
index 4c3b08e77727da97e053db43acf3115f55c0af1e..d5ff2267f41fe1b14e6ec2aaf27f96f76a9dc6e4 100644 (file)
@@ -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;