1
0
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:
Zdenek Kabelac 2021-09-21 18:13:05 +02:00
parent 8c44597820
commit 377e326156
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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)