It's undefined according UBSAN.
Not sure which CL caused test failures, but seems writeBytes for empty buffer
should be OK.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Did this get an LGTM? This change doesn't look right. The old code would return msf_error_code::insufficient_buffer if Data.size() was greater than zero.
Comment Actions
Majnemer, You are right
// here if Buffer is empty:
if (Offset > - Data.size())
return make_error<MSFError>(msf_error_code::insufficient_buffer);
so it's essentially if (Offset >0 || Data.size() >0 )
I should submit the first patch which I've changed in the last moment for "early return" :-)
Comment Actions
Ah, right, but I guess it's unintended one.
Then I am not sure if we want to change something here.