commit 245cb39fa59c5f988a32eec7b15b61bd3b569981
parent d285bdfc245a9e9ed8dc12a4ff8539dd21544d82
Author: Colin Leroy <colin@colino.net>
Date: Fri, 28 Sep 2018 13:20:26 +0200
Fix Coverity warning (unsafe fscanf)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/libravatar/libravatar_missing.c b/src/plugins/libravatar/libravatar_missing.c
@@ -54,7 +54,7 @@ GHashTable *missing_load_from_file(const gchar *filename)
table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
- while ((r = fscanf(file, "%s %llu\n", md5sum, &seen)) != EOF) {
+ while ((r = fscanf(file, "%32s %llu\n", md5sum, &seen)) != EOF) {
if (t - (time_t)seen <= LIBRAVATAR_MISSING_TIME) {
time_t *value = g_malloc0(sizeof(time_t));
*value = (time_t)seen;