ports/x11/xtermset/patches/patch-src_xtermset_c

18 lines
521 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Fix array bounds; that caused a segfault while storing the configuration file,
also ensure EOF is properly matched on archs where char is unsigned (ppc, arm)
Index: src/xtermset.c
--- src/xtermset.c.orig
+++ src/xtermset.c
@@ -33,8 +33,8 @@
int main(int argc, char *argv[])
{
- int i,style,code,switches[2];
- char fn[2][MAXFNCHARS-1],c,*tok;
+ int i,c,style,code,switches[3];
+ char fn[3][MAXFNCHARS-1],*tok;
char line[MAXOPTCHARS+10]; /* ? */
FILE *rcfile=NULL;
argument *argptr = NULL;