- Fix array bounds that caused a segfault while storing the config file - Ensure that we hit EOF while storing/loading the config file on unsigned char archs (powerpc, arm) Wording hint and OK tb@
20 lines
590 B
Plaintext
20 lines
590 B
Plaintext
$OpenBSD: patch-src_xtermset_c,v 1.1 2020/10/13 15:10:39 cwen Exp $
|
|
|
|
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;
|