From 7ed6f9b1ae88478c5c775de92fc7bdff3db4205c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 28 Apr 1995 19:58:06 +0000 Subject: [PATCH] Don't try to strip an empty line. This causes memory reference error git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5630 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/profile/ChangeLog | 5 +++++ src/util/profile/prof_parse.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 3ff592e71..aa0d55a5e 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 28 15:54:40 1995 Theodore Y. Ts'o + + * prof_parse.c (strip_line): Don't try to strip an empty line. + This causes memory reference error. + Thu Apr 27 20:26:48 1995 * Makefile.in (clean-unix): Remove profile.h and test_profile diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c index 794e98266..1e281e0b2 100644 --- a/src/util/profile/prof_parse.c +++ b/src/util/profile/prof_parse.c @@ -32,7 +32,7 @@ void strip_line(line) { char *p; - while (1) { + while (*line) { p = line + strlen(line) - 1; if ((*p == '\n') || (*p == '\r')) *p = 0; -- 2.26.2