From 23ab8cc08d2d6281ef56c184f1e1e905e70a2a22 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 8 Aug 2021 10:48:55 +0200 Subject: Matrix: fix thumbnail upload of small thumbnails, fix small thumbnail creation if webp --- src/Storage.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Storage.cpp') diff --git a/src/Storage.cpp b/src/Storage.cpp index 9a1c492..375be57 100644 --- a/src/Storage.cpp +++ b/src/Storage.cpp @@ -127,6 +127,7 @@ namespace QuickMedia { FileType get_file_type(const Path &path) { struct stat file_stat; + memset(&file_stat, 0, sizeof(file_stat)); int ret; EINTR_RETRY(ret, stat(path.data.c_str(), &file_stat)); if(ret == 0) @@ -160,6 +161,7 @@ namespace QuickMedia { int file_get_size(const Path &path, size_t *size) { struct stat file_stat; + memset(&file_stat, 0, sizeof(file_stat)); int ret; EINTR_RETRY(ret, stat(path.data.c_str(), &file_stat)); if(ret == 0 && S_ISREG(file_stat.st_mode)) { @@ -172,6 +174,7 @@ namespace QuickMedia { bool file_get_last_modified_time_seconds(const char *path, time_t *result) { struct stat file_stat; + memset(&file_stat, 0, sizeof(file_stat)); int ret; EINTR_RETRY(ret, stat(path, &file_stat)); if(ret == 0) { -- cgit v1.2.3