Summary
move-memory! accepts negative offsets
Metadata
- Id: 9ccc55d65a475edc20546ab4a375b1f3d64ae4de
- Trac id: 142
- Type: defect
- Reporter: zbigniew
- Owner: felix
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone:
- Version: 4.2.x
- Changetime: 2010-03-11 10:33:12 UTC
- Created: 2009-12-08 09:00:20 UTC
- Keywords:
Description
And will clobber memory. It does detect the error when the offsets are too large though.
(define b (string->blob (make-string 10 #\nul)))
(move-memory! "foo" b 3 0 7) ; ok
,d b
blob of size 10:
0: 00 00 00 00 00 00 00 66 6f 6f .......foo
(move-memory! "foo" b 3 0 8) ; error (out of range)
(move-memory! "xyz" b 3 -1 0) ; succeeds
,d b
blob of size 10:
0: 42 78 79 00 00 00 00 66 6f 6f Byz....foo
(move-memory! "xyz" b 3 0 -1) ; succeeds
,d b
unknown object
Changes and comments
[2009-12-10 07:46:29 UTC] felix changed status from new to accepted
[2009-12-10 07:46:29 UTC] felix set owner to felix
[2009-12-10 10:00:41 UTC] felix changed status from accepted to closed
[2009-12-10 10:00:41 UTC] felix set resolution to fixed
[2009-12-10 10:00:41 UTC] felix wrote:
Fixed in 72be4d4334280a8bcd83a91253295fb8e32debd7 (master)