diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-01-27 00:15:58 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-01-27 00:15:58 +0100 |
commit | a7ea441163ea1fc096c09070cecf452031b4a00d (patch) | |
tree | 504c75a757ef25876a024b43cd2a5d4639a627a0 | |
parent | 90cfcf8fa7a0db1b6b84f2dba4f909c95e93c463 (diff) | |
download | guile-a7ea441163ea1fc096c09070cecf452031b4a00d.tar.gz |
Fix buffer overflow in `read-line'.
* libguile/rdelim.c (SCM_DEFINE): Compare INDEX to LINE_BUFFER_SIZE, not
`sizeof (buf)'.
-rw-r--r-- | libguile/rdelim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/rdelim.c b/libguile/rdelim.c index 760aa47ee..9d1496795 100644 --- a/libguile/rdelim.c +++ b/libguile/rdelim.c @@ -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. */ |