Re: [Qemu-devel] [PATCH v4 5/5] migration: Use strnlen() for fixed-size string

2019-01-02 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > GCC 8 introduced the -Wstringop-overflow, which detect buffer overflow > by string-modifying functions declared in , such strncpy(), > used in global_state_store_running(). > > GCC indeed found an incorrect use of strlen(), because this array >

Re: [Qemu-devel] [PATCH v4 5/5] migration: Use strnlen() for fixed-size string

2018-12-29 Thread Richard Henderson
On 12/29/18 4:33 AM, Philippe Mathieu-Daudé wrote: > GCC 8 introduced the -Wstringop-overflow, which detect buffer overflow > by string-modifying functions declared in , such strncpy(), > used in global_state_store_running(). > > GCC indeed found an incorrect use of strlen(), because this array >

[Qemu-devel] [PATCH v4 5/5] migration: Use strnlen() for fixed-size string

2018-12-28 Thread Philippe Mathieu-Daudé
GCC 8 introduced the -Wstringop-overflow, which detect buffer overflow by string-modifying functions declared in , such strncpy(), used in global_state_store_running(). GCC indeed found an incorrect use of strlen(), because this array is loaded by VMSTATE_BUFFER(runstate, GlobalState) then parsed