xbps_fetch_file: memset the stat(2) struct before using it.

This commit is contained in:
Juan RP 2011-01-25 17:49:24 +01:00
parent a685c9ee41
commit 35aa4b9951

View File

@ -129,6 +129,7 @@ xbps_fetch_file(const char *uri,
/*
* Check if we have to resume a transfer.
*/
memset(&st, 0, sizeof(st));
if (stat(destfile, &st) == 0) {
if (st.st_size > 0)
restart = true;