summaryrefslogtreecommitdiff
path: root/games-misc/yadex/files/yadex_170-obj-overflow.patch
blob: aba86f1e0e0e2effe84de7157ef99b31a5297832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- yadex-1.7.0/src/objects.cc	2003-03-28 06:37:32.000000000 -0600
+++ yadex-1.7.0/src/objects.cc	2010-05-06 11:42:36.824661556 -0500
@@ -543,7 +543,7 @@
 	 SideDefs[last].yoff = 0;
 	 strcpy (SideDefs[last].tex1, "-");
 	 strcpy (SideDefs[last].tex2, "-");
-	 strcpy (SideDefs[last].tex3, default_middle_texture);
+	 strncpy (SideDefs[last].tex3, default_middle_texture, sizeof(SideDefs[last].tex3));
 	 SideDefs[last].sector = NumSectors - 1;
 	 }
       MadeMapChanges = 1;
--- yadex-1.7.0/src/editobj.cc	2003-04-24 15:32:39.000000000 -0500
+++ yadex-1.7.0/src/editobj.cc	2010-05-07 16:36:49.825412601 -0500
@@ -937,7 +937,7 @@
 	       struct SideDef *s = SideDefs + l->sidedef1;
 	       strcpy (s->tex1, "-");
 	       strcpy (s->tex2, "-");
-	       strcpy (s->tex3, default_middle_texture);
+	       strncpy (s->tex3, default_middle_texture, sizeof(s->tex3));
 	       }
 	    /* Don't delete the 2nd sidedef, it could be used
                by another linedef. And if it isn't, the next