mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 07:11:05 +01:00
Fix longstanding bug with buffer pointer goes beyoud buffer start
Cause initscr (ncurses) fail in some cases
This commit is contained in:
parent
f80feb0c50
commit
aaf9cb20c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28135
@ -47,7 +47,7 @@ int len; {
|
||||
c = getc(f);
|
||||
}
|
||||
|
||||
while(isspace(*(buf-1))) {
|
||||
while(i > 0 && isspace(*(buf-1))) {
|
||||
buf--;
|
||||
i--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user