- 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 22d520c..3c7bfa7 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 4c3b08e..d5ff226 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;