master - cov: check dm_strncpy result
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=668c9d0762fc6736a1e9372785544eda6a939806 Commit: 668c9d0762fc6736a1e9372785544eda6a939806 Parent: b1ff52ca146f58938c07f6c6855bc860453059e6 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Oct 15 16:16:14 2018 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Oct 15 17:49:44 2018 +0200
cov: check dm_strncpy result
--- device_mapper/vdo/status.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
device_mapper/vdo/status.c +5 -1
@@ -207,7 +207,11 @@ bool dm_vdo_status_parse(struct dm_pool *mem, const char *input,_set_error (result,"out of memory" ); goto bad; } -dm_strncpy (s->device, b, te - b +1 ); + +if (!dm_strncpy (s->device, b, te - b +1 )) { +_set_error (result,"copy device" ); + goto bad; + } b =_eat_space (te, e);