[hackers] [st] Using strsep and fixing null termination in csiparse. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Tue, 26 Feb 2013 21:46:28 +0100

commit c6b89f23e7546c30dea42a3c49f99682c5818190
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Tue Feb 26 21:43:40 2013 +0100

    Using strsep and fixing null termination in csiparse.
    
    Thanks for the hint from Alexander Sedov <alex0player_AT_gmail.com>!

diff --git a/config.mk b/config.mk
index ecc5c83..abf25c1 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -19,7 +19,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft \
        $(shell pkg-config --libs freetype2)
 
 # flags
-CPPFLAGS = -DVERSION=\"${VERSION}\"
+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=600
 CFLAGS += -g -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
 LDFLAGS += -g ${LIBS}
 
diff --git a/st.c b/st.c
index 8b5ba64..fc9ed70 100644
--- a/st.c
+++ b/st.c
_AT_@ -1,5 +1,4 @@
 /* See LICENSE for licence details. */
-#define _XOPEN_SOURCE 600
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
_AT_@ -1304,6 +1303,7 @@ csiparse(void) {
                 p++;
         }
 
+ csiescseq.buf[csiescseq.len] = '
Received on Tue Feb 26 2013 - 21:46:28 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 26 2013 - 21:48:10 CET