Suspicous code in kdelibs-3.5.2

Aaron J. Seigo aseigo at kde.org
Wed Apr 5 18:57:25 BST 2006


On Wednesday 05 April 2006 11:44, R.F. Pels wrote:
> On Wednesday 5 April 2006 19.08, Aaron J. Seigo wrote:
> >> i+n easily reaches the array bound 16. For example if n == 15 and i ==
> >> 14, then bm[29][0] is accessed. This is way behind the array bound.
> >
> > false positive. it's a 16x16 array and the code is taking advantage of
> > the fact that it's contiguous memory... so bm[29] is actually the 15th
> > element in the second "row"... fun.
>
> The C++ standard does not say anything about arrays of arrays being in
> contiguous memory, so this is not a false positive.

what platforms/compilers do we support where this isn't the case?

-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060405/1d17bc19/attachment.sig>


More information about the kde-core-devel mailing list