15 lines
410 B
Text
15 lines
410 B
Text
$NetBSD: patch-aa,v 1.6 2009/07/27 12:59:44 obache Exp $
|
|
|
|
Check if sp is a null pointer before parsing it.
|
|
|
|
--- src/fe-text/tparm.c.orig 2007-10-06 10:40:39.000000000 +0100
|
|
+++ src/fe-text/tparm.c
|
|
@@ -247,7 +247,7 @@ char *tparm(const char *str, ...) {
|
|
argcnt = 0;
|
|
pos = 0;
|
|
termcap = 1;
|
|
- while (*sp != '\0') {
|
|
+ while ((sp != NULL) && (*sp != '\0')) {
|
|
switch(*sp) {
|
|
case '\\':
|
|
if (scan_for) {
|