From 96f649aa3b7ee7d6814ecce639bde2a84cd857ed Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 10 Dec 2005 21:36:56 +0000 Subject: [PATCH] (__argp_fmtstream_update): Fix coredump --- lib/argp-fmtstream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/argp-fmtstream.c b/lib/argp-fmtstream.c index 0ba19c5ae..0dd9256f5 100644 --- a/lib/argp-fmtstream.c +++ b/lib/argp-fmtstream.c @@ -246,9 +246,10 @@ __argp_fmtstream_update (argp_fmtstream_t fs) Oh well. Put it on an overlong line by itself. */ p = buf + (r + 1 - fs->point_col); /* Find the end of the long word. */ - do - ++p; - while (p < nl && !isblank (*p)); + if (p < nl) + do + ++p; + while (p < nl && !isblank (*p)); if (p == nl) { /* It already ends a line. No fussing required. */ -- 2.11.0