mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 11:02:44 +00:00
Ctags write to buffer beyond the end of it when the source file
doesn't end with '\n'. It brings segmentation fault. PR: 4812 Reviewed by: phk Submitted by: Shigio Yamaguchi <shigio@wafu.netgate.net>
This commit is contained in:
parent
0a61a2c2ce
commit
d459926593
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35307
@ -59,7 +59,7 @@ getline()
|
||||
saveftell = ftell(inf);
|
||||
(void)fseek(inf, lineftell, L_SET);
|
||||
if (xflag)
|
||||
for (cp = lbuf; GETC(!=, '\n'); *cp++ = c)
|
||||
for (cp = lbuf; GETC(!=, EOF) && c != '\n'; *cp++ = c)
|
||||
continue;
|
||||
/*
|
||||
* do all processing here, so we don't step through the
|
||||
|
Loading…
Reference in New Issue
Block a user