bug#62290: Error when handling invalid unicode with suspendable ports

2023-03-20 Thread Christopher Baines
Here's a simple reproducer: (use-modules (ice-9 binary-ports) (ice-9 suspendable-ports) (rnrs bytevectors)) (define (test) (let* ((sequence '(#xf4 #xa4 #xbd #xa4)) (p (open-bytevector-input-port (u8-list->bytevector sequ

bug#62290: [PATCH] Fix some invalid unicode handling issues with suspendable ports.

2023-03-20 Thread Christopher Baines
Based on the implementation in ports.c. I don't understand what this code is really doing, but the suspendable ports implementation differs from the similar C code for a couple of inequalities. * module/ice-9/suspendable-ports.scm (decode-utf8, bad-utf8-len): Flip a couple of inequalities. * test

bug#62290: Error when handling invalid unicode with suspendable ports

2023-03-20 Thread Ludovic Courtès
Hello, Christopher Baines skribis: > Based on the implementation in ports.c. I don't understand what this > code is really doing, but the suspendable ports implementation differs > from the similar C code for a couple of inequalities. > > * module/ice-9/suspendable-ports.scm (decode-utf8, bad-u