Commit fd3d0ec
committed
src: fix crash when writing odd-length hex string via Writev
StringBytes::StorageSize had a CHECK that fatal-asserted when a
hex-encoded string with an odd number of characters was written
through Writev (e.g. via HTTP requests which are automatically
corked). Writing the same string via a single Write did not crash
because StringBytes::Write delegates to HexDecode, which silently
drops the trailing incomplete nibble.
Remove the CHECK and let integer division handle odd lengths, which
is consistent with StringBytes::Size and HexDecode.
Fixes: #45150
Signed-off-by: RajeshKumar11 <kakumanurajeshkumar@gmail.com>1 parent 2f56cd2 commit fd3d0ec
2 files changed
Lines changed: 792 additions & 702 deletions
0 commit comments