mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: ensuring buffer is zeroed
This commit is contained in:
parent
8c44597820
commit
377e326156
@ -457,6 +457,7 @@ retry:
|
|||||||
if (count < dump_len)
|
if (count < dump_len)
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
||||||
|
dump_buf[count] = 0;
|
||||||
rv = 0;
|
rv = 0;
|
||||||
if ((info && dump) || !strcmp(req_name, "dump"))
|
if ((info && dump) || !strcmp(req_name, "dump"))
|
||||||
printf("%s\n", dump_buf);
|
printf("%s\n", dump_buf);
|
||||||
|
@ -119,6 +119,7 @@ static int read_cluster_name(char *clustername)
|
|||||||
log_error(close_error_msg, fd);
|
log_error(close_error_msg, fd);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
clustername[rv] = 0;
|
||||||
|
|
||||||
n = strstr(clustername, "\n");
|
n = strstr(clustername, "\n");
|
||||||
if (n)
|
if (n)
|
||||||
|
Loading…
Reference in New Issue
Block a user