[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working http-get example and still unsolved problem

From: Ian Price
Subject: Re: Working http-get example and still unsolved problem
Date: Mon, 07 May 2012 06:16:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Sunjoong Lee <address@hidden> writes:

> Ian had made a new patch for Chunked Encoding, 
> ; thanks 
> Ian. But I suspect it has a bug.
> make-chunked-input-port use bytevector-copy! in read!. I saw the crash like 
> this;
>   ERROR: In procedure bytevector-copy!:
>   ERROR: Value out of range 0 to 4294967295: -5915
> I can't tell the url of the web page made that crash because I had seen it in 
> my testing login to that page but can tell you that was not written by 
> english and the charset of
> that is not UTF-8. I suspect the cause of the crash be in using 
> bytevector-copy!.

Odd that I hadn't noticed this issue when I was testing. The problem
occurs in the case where the number to be read is less than the
remaining size of a chunk. I was updating the count with the buffer
size, rather than the difference, which leads to negative values on the
recursive call. There was also a mistake in the same case in updating
the buffer-pointer.

Thanks for pointing this out, and if you have other comments on the
implementation (and the close-port issue), I'll be happy to have them.

Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]