File: array_bounds.patch

package info (click to toggle)
pdfcube 0.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 628 kB
  • sloc: cpp: 1,581; sh: 1,034; makefile: 16
file content (22 lines) | stat: -rw-r--r-- 989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: The top_color array is defined as containing 4 elements, yet 
 the fifth element was accessed.
Author: Simon Ruderich <simon AT ruderich.org>
Bug-Debian: http://bugs.debian.org/662240
Forwarded: per mail to Mirko Maischberger

--- pdfcube-0.0.4.orig/src/pdfcube.cc
+++ pdfcube-0.0.4/src/pdfcube.cc
@@ -1112,11 +1112,11 @@ protected:
       } else if (i <= 3) {
         glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
         glDisable(GL_TEXTURE_RECTANGLE_ARB);
-        glColor4f(top_color[0], top_color[1], top_color[2], top_color[4]);
+        glColor4f(top_color[0], top_color[1], top_color[2], top_color[3]);
       } else {
         glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
         glDisable(GL_TEXTURE_RECTANGLE_ARB);
-        glColor4f(top_color[0], top_color[1], top_color[2], top_color[4]);
+        glColor4f(top_color[0], top_color[1], top_color[2], top_color[3]);
       }
       glPolygonMode(GL_FRONT, GL_FILL);
       glCallList(cube_faces+i);