Re: [PATCH 05/12] util/error: allow non-NUL-terminated err->src

2025-05-28 Thread Markus Armbruster
Paolo Bonzini writes: > On 5/27/25 15:42, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> Rust makes the current file available as a statically-allocated string, >>> but without a NUL terminator. Allow this by storing an optional maximum >>> length in the Error. >>> >>> Note that for

Re: [PATCH 05/12] util/error: allow non-NUL-terminated err->src

2025-05-27 Thread Paolo Bonzini
On 5/27/25 15:42, Markus Armbruster wrote: Paolo Bonzini writes: Rust makes the current file available as a statically-allocated string, but without a NUL terminator. Allow this by storing an optional maximum length in the Error. Note that for portability I am not relying on fprintf's precis

Re: [PATCH 05/12] util/error: allow non-NUL-terminated err->src

2025-05-27 Thread Markus Armbruster
Paolo Bonzini writes: > Rust makes the current file available as a statically-allocated string, > but without a NUL terminator. Allow this by storing an optional maximum > length in the Error. > > Note that for portability I am not relying on fprintf's precision > specifier not accessing memory

[PATCH 05/12] util/error: allow non-NUL-terminated err->src

2025-05-26 Thread Paolo Bonzini
Rust makes the current file available as a statically-allocated string, but without a NUL terminator. Allow this by storing an optional maximum length in the Error. Note that for portability I am not relying on fprintf's precision specifier not accessing memory beyond what will be printed. Signe