>From 436564139521f1f181a45ed9a276834ba49f318a Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sat, 16 Feb 2013 14:01:08 +0100 Subject: [PATCH] Get rid of overflow situation in read-line causing lines to be read wrong --- posixunix.scm | 2 +- tcp.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/posixunix.scm b/posixunix.scm index 251c400..650d2c3 100644 --- a/posixunix.scm +++ b/posixunix.scm @@ -1388,7 +1388,7 @@ EOF (fetch)) (if (fx>= bufpos buflen) #!eof - (let ((limit (or limit (##sys#fudge 21)))) + (let ((limit (or limit (fx- (##sys#fudge 21) bufpos)))) (receive (next line) (##sys#scan-buffer-line buf diff --git a/tcp.scm b/tcp.scm index d0657a4..758c7d2 100644 --- a/tcp.scm +++ b/tcp.scm @@ -433,7 +433,7 @@ EOF (read-input)) (if (fx>= bufindex buflen) #!eof - (let ((limit (or limit (##sys#fudge 21)))) + (let ((limit (or limit (fx- (##sys#fudge 21) bufindex)))) (receive (next line) (##sys#scan-buffer-line buf -- 1.8.0.1