diff options
author | ache <ache@FreeBSD.org> | 1997-08-13 01:21:36 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-08-13 01:21:36 +0000 |
commit | 89f12e03aa02b447a9d101ff7bb03ce87c2810c9 (patch) | |
tree | 246abee49f4a881cd216373e7be37ca0a06d0470 /lib | |
parent | 2d758a45281f2bb6c6b41405f0e511a40c188bef (diff) | |
download | FreeBSD-src-89f12e03aa02b447a9d101ff7bb03ce87c2810c9.zip FreeBSD-src-89f12e03aa02b447a9d101ff7bb03ce87c2810c9.tar.gz |
Fix longstanding bug with buffer pointer goes beyoud buffer start
Cause initscr (ncurses) fail in some cases
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libmytinfo/findterm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libmytinfo/findterm.c b/lib/libmytinfo/findterm.c index 1fe5a9b..8fc41a0 100644 --- a/lib/libmytinfo/findterm.c +++ b/lib/libmytinfo/findterm.c @@ -47,7 +47,7 @@ int len; { c = getc(f); } - while(isspace(*(buf-1))) { + while(i > 0 && isspace(*(buf-1))) { buf--; i--; } |