Fix to inflate: treat EOF as a character, as in the C code.
closes PR 13489. In the C code, inflate is allowed to peek at least one character beyond the extent of a deflated byte sequence. The thread related to the bug report of PR 13489 documents that deflate can peek beyond EOF.
|@@ -278,7 +278,8 @@|
|(set! buf-pos MAX-LOOKAHEAD))|
|(let ([got (peek-bytes-avail! buffer buf-pos #f input-port buf-pos BUFFER-SIZE)])|
|(if (eof-object? got)|
|- (error 'inflate "unexpected end of file")|
|+ (begin (bytes-set! buffer buf-pos 255)|
|+ (set! buf-max (add1 buf-pos)))|
|(set! buf-max (+ buf-pos got))))|
|(let ([v (bytes-ref buffer buf-pos)])|