mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Fix buffer overflow in `read-line'.
* libguile/rdelim.c (SCM_DEFINE): Compare INDEX to LINE_BUFFER_SIZE, not `sizeof (buf)'.
This commit is contained in:
parent
90cfcf8fa7
commit
a7ea441163
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ SCM_DEFINE (scm_read_line, "%read-line", 0, 1, 0,
|
|||
|
||||
do
|
||||
{
|
||||
if (SCM_UNLIKELY (index >= sizeof (buf)))
|
||||
if (SCM_UNLIKELY (index >= LINE_BUFFER_SIZE))
|
||||
{
|
||||
/* The line is getting longer than BUF so store its current
|
||||
contents in STRINGS. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue