blob: bd7ca037eef92fb1c89278c5d3b9ec979b14e7c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
$NetBSD: patch-aa,v 1.5 2007/10/13 16:27:15 adrianp Exp $
--- 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 != '\0') && (sp != NULL)) {
switch(*sp) {
case '\\':
if (scan_for) {
|