Re: [PATCH] migration/multifd: Ensure packet->ramblock is null-terminated

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 12:06:11PM -0300, Fabiano Rosas wrote: > Coverity points out that the current usage of strncpy to write the > ramblock name allows the field to not have an ending '\0' in case > idstr is already not null-terminated (e.g. if it's larger than 256 > bytes). > > This is current

[PATCH] migration/multifd: Ensure packet->ramblock is null-terminated

2024-09-19 Thread Fabiano Rosas
Coverity points out that the current usage of strncpy to write the ramblock name allows the field to not have an ending '\0' in case idstr is already not null-terminated (e.g. if it's larger than 256 bytes). This is currently harmless because the packet->ramblock field is never touched again on th