mirror of
https://github.com/mirror/make.git
synced 2025-01-27 12:51:07 +08:00
Fix buffer overrun in concat().
This commit is contained in:
parent
9903cda2a7
commit
df2fa7c5a5
@ -1,3 +1,7 @@
|
|||||||
|
2010-07-16 Boris Kolpackov <boris@codesynthesis.com>
|
||||||
|
|
||||||
|
* misc.c (concat): Fix buffer overrun.
|
||||||
|
|
||||||
2010-07-12 Paul Smith <psmith@gnu.org>
|
2010-07-12 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
Update copyrights to add 2010.
|
Update copyrights to add 2010.
|
||||||
|
8
misc.c
8
misc.c
@ -202,6 +202,14 @@ concat (num, va_alist)
|
|||||||
|
|
||||||
VA_END (args);
|
VA_END (args);
|
||||||
|
|
||||||
|
/* Get some more memory if we don't have enough space for the
|
||||||
|
terminating '\0'. */
|
||||||
|
if (ri == rlen)
|
||||||
|
{
|
||||||
|
rlen = (rlen ? rlen : 60) * 2;
|
||||||
|
result = xrealloc (result, rlen);
|
||||||
|
}
|
||||||
|
|
||||||
result[ri] = '\0';
|
result[ri] = '\0';
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user