bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

Issue 4503: Added check into BufferedChannel's read to avoid endless loop

Open StefanoBelli opened this issue 1 year ago • 2 comments

Fix #4503

Motivation

As discussed in the referred issue, this PR aims to avoid the endless loop which will happen if the dest ByteBuf passed to the BufferedChannel's read has less remaining writable bytes than the amount of bytes required to read (read's "length" parameter)

Changes

Now, BufferedChannel.read() throws an exception if dest. buf. writableBytes is less than length

StefanoBelli avatar Sep 18 '24 13:09 StefanoBelli

Thanks for your contribution. Could you please add a unit test for this change?

hezhangjian avatar Sep 18 '24 22:09 hezhangjian

Of course, I will add test cases to the existing BufferedChanelTests

StefanoBelli avatar Sep 19 '24 06:09 StefanoBelli

Hi, some time has passed since this pr opened and I recall that CI error was due to unability of wget to download a bk tar (maybe some backward compat tests) compressed archive from apache.org, just saying to allow you to rerun CI and then close this PR

StefanoBelli avatar Jan 13 '25 15:01 StefanoBelli

reopen's reason: rerun failure checks

StevenLuMT avatar Feb 15 '25 23:02 StevenLuMT