|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v1 8/8] migration: use pstrcpy to copy run state |
Date: | Thu, 3 Sep 2020 21:43:44 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/3/20 2:13 PM, Paolo Bonzini wrote: > Il gio 3 set 2020, 13:21 Alex Bennée <alex.bennee@linaro.org > <mailto:alex.bennee@linaro.org>> ha scritto: > > The gcov build triggered: > > ../../migration/global_state.c:47:5: error: ‘strncpy’ specified > bound 100 equals destination size [-Werror=stringop-truncation] > strncpy((char *)global_state.runstate > > As we shouldn't be using strncpy anyway lets use the suggested > pstrcpy. > > > This is wrong, we want the all-zeros behavior of strncpy that pstrcpy lacks. FWIW links to previous discussions: https://www.mail-archive.com/qemu-devel@nongnu.org/msg584216.html > > Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |