Closed planteen closed 9 years ago
Pull request to fix here: https://github.com/hybridgroup/rubyserial/pull/18
Error message:
IndexError: Memory access offset=0 size=54018 is out of bounds
get_bytes at org/jruby/ext/ffi/AbstractMemory.java:1880
read at C:/jruby-1.7.18/lib/ruby/gems/shared/gems/rubyserial-0.2.1/lib/rubyserial/windows.rb:50
The fix has been pushed in 0.2.2
If reading 723 bytes (0x2d3) from the serial port, the interpreted value from the .unpack(H4) processing will be 0xd302 (54018 bytes), causing an out-of-bounds crash in the buff.get_bytes call. Issue found on 64-bit Windows 7 with Ruby 2.0.0