ringbuffer.size must be at least 2, and is a 16-bit quantity. This fixes several cases including the one the fuzzer discovered, which would lead to a fatal signal when accessing the object. Fixes issue #17847. Signed-off-by: Jeff Epler <jepler@gmail.com>
19 lines
283 B
Text
19 lines
283 B
Text
<RingIO>
|
|
0
|
|
1
|
|
2
|
|
b'\x00\x00'
|
|
0
|
|
b'\x00\x01'
|
|
b''
|
|
16
|
|
0
|
|
b'\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01'
|
|
<RingIO>
|
|
16
|
|
0
|
|
b'\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01'
|
|
<class 'TypeError'>
|
|
<class 'ValueError'>
|
|
<class 'ValueError'>
|
|
<class 'ValueError'>
|