"Chris Uppal" <
[hidden email]> wrote in message
news:3f98fe05$0$113$
[hidden email]...
> Shouldn't ExternalArray>>keysAndValuesDo: check its bounds before
iterating ?
> I've just noticed that I can iterate off into never-never land by
providing
> out-of-bounds start/stop indexes.
Yes, it is. Out-of-bounds access would be caught by the underlying
collection in the case of internal buffers (i.e. it contains a ByteArray),
but not when the ExternalArray is a reference (i.e. it contains an
ExternalAddress). The same applies to ExternalArray>>at: and #at:put:. This
is already patched in PL2 which I am hoping to release in beta later today.
Of course it is still possible to write outside the bounds of an
by-reference buffer if one sets up the length wrongly, but I'm afraid that
is unavoidable.
Regards
Blair