GNU bug report logs - #15100
Division by zero in bytevector->uint-list

Previous Next

Package: guile;

Reported by: Göran Weinholt <goran <at> weinholt.se>

Date: Thu, 15 Aug 2013 11:26:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Göran Weinholt <goran <at> weinholt.se>
Subject: bug#15100: closed (Re: bug#15100: Division by zero in
 bytevector->uint-list)
Date: Sat, 17 Aug 2013 03:20:07 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15100: Division by zero in bytevector->uint-list

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15100 <at> debbugs.gnu.org.

-- 
15100: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15100
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mark H Weaver <mhw <at> netris.org>
To: Göran Weinholt <goran <at> weinholt.se>
Cc: 15100-done <at> debbugs.gnu.org
Subject: Re: bug#15100: Division by zero in bytevector->uint-list
Date: Fri, 16 Aug 2013 23:19:15 -0400
Göran Weinholt <goran <at> weinholt.se> writes:

> the bytevector->uint-list procedure from (rnrs) can crash Guile through
> a division by zero:
>
> scheme@(guile-user)> (import (rnrs))
> scheme@(guile-user)> (bytevector->uint-list #vu8(0) 'x 0)
> Floating point exception
>
> The same happens with bytevector->sint-list.

Fixed in 088cfb7d761b01a2620d78f10e8dbcaa07485a32.

> These procedures also do not check that the length of the bytevector
> is divisible by the size.

I don't think we can fix this in stable-2.0, because some existing code
might depend on our current permissive behavior.  However, I fixed it on
the master branch in c099201da1de71652b9791fb0a3a863b6d3c355d.

    Thanks!
      Mark

[Message part 3 (message/rfc822, inline)]
From: Göran Weinholt <goran <at> weinholt.se>
To: bug-guile <at> gnu.org
Subject: Division by zero in bytevector->uint-list
Date: Thu, 15 Aug 2013 13:02:16 +0200
[Message part 4 (text/plain, inline)]
Hello schemers,

the bytevector->uint-list procedure from (rnrs) can crash Guile through
a division by zero:

scheme@(guile-user)> (import (rnrs))
scheme@(guile-user)> (bytevector->uint-list #vu8(0) 'x 0)
Floating point exception

The same happens with bytevector->sint-list. These procedures also do
not check that the length of the bytevector is divisible by the size.

Tested with GNU Guile 2.0.9.71-8d5d04.

Regards,

-- 
Göran Weinholt <goran <at> weinholt.se>
"What's worse than clowns? Danish clowns."
  -- Mystery Science Theatre 3000
[Message part 5 (application/pgp-signature, inline)]

This bug report was last modified 11 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.