aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-09-19 20:51:38 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-09-19 20:51:38 +0000
commite8b2a826cac2f22660141f8d9646dcc68b67199c (patch)
treea06a83d5ade94126bbe93cd8247872b97cf80ca4 /packages
parent485ed422c35f3ff48960f36f45e3f3e4001c6a63 (diff)
taken from Thomas' patch tracker 1473684, its been taken into 0.40
svn path=/trunk/; revision=5970
Diffstat (limited to 'packages')
-rw-r--r--packages/patches/array_overflow_fix-0.39.2.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/patches/array_overflow_fix-0.39.2.patch b/packages/patches/array_overflow_fix-0.39.2.patch
new file mode 100644
index 00000000..d7178dde
--- /dev/null
+++ b/packages/patches/array_overflow_fix-0.39.2.patch
@@ -0,0 +1,36 @@
+--- s_inter.c.orig 2006-09-19 11:44:05.000000000 -0400
++++ s_inter.c 2006-09-19 16:44:21.000000000 -0400
+@@ -844,7 +844,8 @@
+
+ #define FIRSTPORTNUM 5400
+
+-static int defaultfontshit[] = {
++#define MAXFONTS 21
++static int defaultfontshit[MAXFONTS] = {
+ 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28,
+ 24, 15, 28};
+
+@@ -894,7 +895,7 @@
+ {
+ /* fake the GUI's message giving cwd and font sizes; then
+ skip starting the GUI up. */
+- t_atom zz[19];
++ t_atom zz[MAXFONTS+2];
+ int i;
+ #ifdef _WIN32
+ if (GetCurrentDirectory(MAXPDSTRING, cmdbuf) == 0)
+@@ -906,10 +907,10 @@
+
+ #endif
+ SETSYMBOL(zz, gensym(cmdbuf));
+- for (i = 1; i < 22; i++)
+- SETFLOAT(zz + i, defaultfontshit[i-1]);
+- SETFLOAT(zz+22,0);
+- glob_initfromgui(0, 0, 23, zz);
++ for (i = 0; i < MAXFONTS; i++)
++ SETFLOAT(zz+i+1, defaultfontshit[i]);
++ SETFLOAT(zz+i+1,0);
++ glob_initfromgui(0, 0, MAXFONTS+2, zz);
+ }
+ else if (sys_guisetportnumber) /* GUI exists and sent us a port number */
+ {