Package: mrxvt / 0.5.4-2

11macros_avoid_segfault.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
Subject: Fix the checks of the s parameter, which comes from astr and may perfectly be NULL.

--- a/src/macros.c
+++ b/src/macros.c
@@ -1345,7 +1345,7 @@
 		    linecont	= 1;
 
 
-	    if( *s && *s == '-' )
+	    if( s && *s == '-' )
 	    {
 		while( *(++s) && !isspace( *s ) )
 		{
@@ -1365,7 +1365,7 @@
 	    }
 
 	    rxvt_scr_printscreen( r, ATAB(r), scrollback, pretty, linecont,
-		    *s ? s : NULL );
+		    s );
 
 	    break;
 	}