[Bug 253911] New: libkdcraw access beyond array bounds (cameraXYZMatrix)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 253911] New: libkdcraw access beyond array bounds (cameraXYZMatrix)

Bugzilla from vapier@gentoo.org
https://bugs.kde.org/show_bug.cgi?id=253911

           Summary: libkdcraw access beyond array bounds (cameraXYZMatrix)
           Product: digikam
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: NOR
         Component: libkdcraw
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Version:           unspecified (using KDE 4.5.2)
OS:                Linux

building libkdcraw results in:

libs/libkdcraw/libkdcraw/dcrawinfocontainer.cpp: In member function ‘bool
KDcrawIface::DcrawInfoContainer::is
Empty()’:
libs/libkdcraw/libkdcraw/dcrawinfocontainer.cpp:123:29: warning: array
subscript is above array bounds
libs/libkdcraw/libkdcraw/dcrawinfocontainer.cpp:127:29: warning: array
subscript is above array bounds
libs/libkdcraw/libkdcraw/dcrawinfocontainer.cpp:131:29: warning: array
subscript is above array bounds

looking at the source code, seems to be a mismatch of x and y coordinates:

dcrawinfocontainer.h:    float            cameraXYZMatrix[4][3];

dcrawinfocontainer.cpp:        cameraXYZMatrix[0][0]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[0][1]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[0][2]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[0][3]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[1][0]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[1][1]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[1][2]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[1][3]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[2][0]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[2][1]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[2][2]    == 0.0 &&
dcrawinfocontainer.cpp:        cameraXYZMatrix[2][3]    == 0.0 &&

looks like the indices are switched and should be [0..3][0..2] instead of
[0..2][0..3]

Reproducible: Didn't try




using gcc-4.5.1

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 253911] libkdcraw access beyond array bounds (cameraXYZMatrix)

"Jens Müller"
https://bugs.kde.org/show_bug.cgi?id=253911


Jens Mueller <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |[hidden email]
     Ever Confirmed|0                           |1




--- Comment #1 from Jens Mueller <tschenser gmx de>  2010-10-12 07:38:29 ---
This is true, indices should be [0..3][0..2], i will change that.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 253911] libkdcraw access beyond array bounds (cameraXYZMatrix)

"Jens Müller"
In reply to this post by Bugzilla from vapier@gentoo.org
https://bugs.kde.org/show_bug.cgi?id=253911


Jens Mueller <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Jens Mueller <tschenser gmx de>  2010-10-12 17:56:17 ---
SVN commit 1185210 by jmueller:

Fix compiler warning

BUGS: 253911

 M  +3 -3      dcrawinfocontainer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1185210

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 253911] libkdcraw access beyond array bounds (cameraXYZMatrix)

Gilles Caulier-4
In reply to this post by Bugzilla from vapier@gentoo.org
https://bugs.kde.org/show_bug.cgi?id=253911





--- Comment #3 from Gilles Caulier <caulier gilles gmail com>  2010-10-13 11:40:42 ---
SVN commit 1185411 by cgilles:

index to matrix must be inverted there, else we touch outside of allocated
memory.
CCBUGS: 253911


 M  +1 -1      dcrawinfocontainer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1185411

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 253911] libkdcraw access beyond array bounds (cameraXYZMatrix)

Gilles Caulier-4
In reply to this post by Bugzilla from vapier@gentoo.org
https://bugs.kde.org/show_bug.cgi?id=253911

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |1.6.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel