In bytevector->uint-list et al, check that SIZE divides the bv length.
authorMark H Weaver <mhw@netris.org>
Sat, 17 Aug 2013 03:10:14 +0000 (23:10 -0400)
committerMark H Weaver <mhw@netris.org>
Sat, 17 Aug 2013 03:13:54 +0000 (23:13 -0400)
commitc099201da1de71652b9791fb0a3a863b6d3c355d
tree528a272b65dc627445da3a3100acc551923ebcfe
parent88cff2ef1bd0d11987f034d2e7dec10c89f5719d
In bytevector->uint-list et al, check that SIZE divides the bv length.

Fixes <http://bugs.gnu.org/15100>.
Reported by Göran Weinholt <goran@weinholt.se>.

* libguile/bytevectors.c (INTEGERS_TO_LIST): Enforce the R6RS
  requirement that SIZE divides the bytevector length.

* test-suite/tests/bytevectors.test: Add test.  Remove tests that
  assumes that this "divides" check is not enforced.
libguile/bytevectors.c
test-suite/tests/bytevectors.test