[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bdigikam=5D_libs/dimg=3A_Apply_fix_by_RJVB_=3Crjvber?= =?utf-8?q?tin=40gmail=2Ecom=3E=3A
From:       Marcel Wiesweg <marcel.wiesweg () gmx ! de>
Date:       2014-12-28 19:13:08
Message-ID: E1Y5JH2-0003IX-9Z () scm ! kde ! org
[Download RAW message or body]

Git commit 94bc2463c9c1f6c9cebc4b2f2ff71ba2a54c9d9d by Marcel Wiesweg.
Committed on 28/12/2014 at 19:11.
Pushed by mwiesweg into branch 'master'.

Apply fix by RJVB <rjvbertin@gmail.com>: Correct incorrect read of one single byte \
beyond the buffer in the DImg 180 °-rotation code

Thanks for your help.
BUG: 342229

M  +2    -2    libs/dimg/dimg.cpp

http://commits.kde.org/digikam/94bc2463c9c1f6c9cebc4b2f2ff71ba2a54c9d9d

diff --git a/libs/dimg/dimg.cpp b/libs/dimg/dimg.cpp
index 4a99e75..941f8ed 100644
--- a/libs/dimg/dimg.cpp
+++ b/libs/dimg/dimg.cpp
@@ -2355,7 +2355,7 @@ void DImg::rotate(ANGLE angle)
                 for (uint y = 0; y < ymax; ++y)
                 {
                     line1 = data + y * w;
-                    line2 = data + (h - y) * w;
+                    line2 = data + (h - y) * w - 1;
 
                     for (uint x = 0; x < w; ++x)
                     {
@@ -2387,7 +2387,7 @@ void DImg::rotate(ANGLE angle)
                 for (uint y = 0; y < ymax; ++y)
                 {
                     line1 = data + y * w;
-                    line2 = data + (h - y) * w;
+                    line2 = data + (h - y) * w - 1;
 
                     for (uint x = 0; x < w; ++x)
                     {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic