openbsd-ports/x11/xtermset/patches/patch-src_term_c
cwen 2e32c1056f xtermset: fix two issues about dealing with configuration files
- 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@
2020-10-13 15:10:39 +00:00

18 lines
401 B
Plaintext

$OpenBSD: patch-src_term_c,v 1.1 2020/10/13 15:10:39 cwen Exp $
Be sure we hit EOF while loading the configuration file on archs where char is
unsigned (ppc, arm)
Index: src/term.c
--- src/term.c.orig
+++ src/term.c
@@ -116,7 +116,7 @@ void term_loadall() {
good_term *n;
char line[MAXTERMCHARS+3];
int i,j=0,l,t=0;
- char c;
+ int c;
fp = fopen(TERMSDIR "/" TERMSFILE,"r");