Package: pdfcube
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

While building pdfcube I found the following warnings:

    pdfcube.cc: In member function 'void pdfcube::redraw(GtkWidget*)':
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1115:73: warning: array subscript is above array bounds 
[-Warray-bounds]
    pdfcube.cc:1119:73: warning: array subscript is above array bounds 
[-Warray-bounds]

The problem is in the following code snippet (pdfcube.cc:1115 and
pdfcube.cc:1119):

    glColor4f(top_color[0], top_color[1], top_color[2], top_color[4]);

top_color is defined in pdfcube.cc:102:

    static GLfloat top_color[4] = { 0.7, 0.6, 0.6, 0.0 };

The array has only four elements, but the fifth element is
accessed. Changing top_color[4] to top_color[3] fixes the
warning, but I haven't tested pdfcube with the change.

Regards,
Simon

- -- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJPU+A2AAoJEJL+/bfkTDL5K5sP/39XNSZCCdS1aRS4HFMQvSqT
EII6tY6MQVU5k/jJ7ZveDVRs3QjA6uUF4246QXtw+NC79AFkuuOIIMVwNSU6kNBX
AqJNSX5815KKf2NHI9pv3BgkkGe2y8pQGnu5uEvJEAx8KqHApkeQwOtdAhi6Z6hN
l4oVzX6DMwGMMUI2xdjcMrHkX7W9AKsJFhHrp+8fb3m+CP4IR7Q1XDi11/WukkAx
mjOP73RlZlTbKria4w7F3qmepv0hR0wKykKiXuYmG14Gvqw/3WxqHIzwHtNAi8C3
+ZvTSyPyh19qozD2Sx+quLjwA40TD0ttxwUuzH7PErjnww2/zbrn2Q9JG1uII6Mg
FLJKbZIdN+zBvpWOwcNDhK4GzXrNCnoRt0LRSGtIbdUyvSKbh86AGayDYO3UMsom
95fzh8/WYyE/5INYP4wpOsznXrrrG8czIWiVehj6jYUDtopNWjWPWW6izUTMKlyj
Z4xdJ4tLVha/mTrVRTXy3QXKpKVEivlVDHYVxv17Bv6YyTfJxKX80888G6Ftgzy7
r0e/OzzGvCXUN+pqYLtFBR3186/FXcxSnFxf4J2C+6IufZ67dLHL7OH3+9/wod0G
UzBepeke8G53igvdcgqafWuXw66e/2IVXu+CFDI5xyYeLdofHRhQciWWF4JSQeZ0
Feyzym/Uxe6IiN0obPwn
=+Pqp
-----END PGP SIGNATURE-----



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to