With the change of interpreting != 0 in CDR as true for a boolean, a call to dds_stream_normalize_data may now also modify the input when the endianness is native, if only for badly formed CDR. (See commit 615d5aae0004340dc5013fef6218276d51667e64)
For untrusted inputs we therefore no longer have the luxury of casting away the constness if we know there is no need to byteswap the input.
In regular operation, the only const inputs are those coming from IDLC and so, at least in principle, trustworthy. All untrustworthy stuff is dynamically allocated and not truly const. Where we do run into this is in fuzzing.
With the change of interpreting != 0 in CDR as true for a boolean, a call to dds_stream_normalize_data may now also modify the input when the endianness is native, if only for badly formed CDR. (See commit 615d5aae0004340dc5013fef6218276d51667e64)
For untrusted inputs we therefore no longer have the luxury of casting away the constness if we know there is no need to byteswap the input.
In regular operation, the only const inputs are those coming from IDLC and so, at least in principle, trustworthy. All untrustworthy stuff is dynamically allocated and not truly const. Where we do run into this is in fuzzing.