Re: [PATCH v2] block/file-posix: fix wps checking in raw_co_prw

2023-06-07 Thread Sam Li
Damien Le Moal 于2023年6月8日周四 09:29写道: > > On 6/8/23 03:57, Sam Li wrote: > > If the write operation fails and the wps is NULL, then accessing it will > > lead to data corruption. > > > > Solving the issue by adding a nullptr checking in get_zones_wp() where > > the wps is used. > > > > This issue i

Re: [PATCH v2] block/file-posix: fix wps checking in raw_co_prw

2023-06-07 Thread Damien Le Moal
On 6/8/23 03:57, Sam Li wrote: > If the write operation fails and the wps is NULL, then accessing it will > lead to data corruption. > > Solving the issue by adding a nullptr checking in get_zones_wp() where > the wps is used. > > This issue is found by Peter Maydell using the Coverity Tool (CID

[PATCH v2] block/file-posix: fix wps checking in raw_co_prw

2023-06-07 Thread Sam Li
If the write operation fails and the wps is NULL, then accessing it will lead to data corruption. Solving the issue by adding a nullptr checking in get_zones_wp() where the wps is used. This issue is found by Peter Maydell using the Coverity Tool (CID 1512459). Signed-off-by: Sam Li --- block/