From 3141892679138098bd82a7258d8e335dff9032f9 Mon Sep 17 00:00:00 2001 From: Deron Johnson Date: Fri, 18 Feb 2005 17:37:21 +0000 Subject: More 682 merge --- pf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pf.c') diff --git a/pf.c b/pf.c index 2cacbdc..ae84403 100644 --- a/pf.c +++ b/pf.c @@ -87,8 +87,12 @@ void process_line (buffer) int i; char *cp; - len = strlen (buffer); - + /* copy buffer since it may point to unwritable date */ + len = strlen(buffer); + cp = chk_malloc(len + 1); + strcpy(cp, buffer); + buffer = cp; + for (i = 0; i < len; i++) { /* look for blank lines */ register char c = buffer[i]; if (!(isspace(c) || c == '\n')) break; -- cgit v1.2.3