Replace strcat with strlcat

This commit is contained in:
o9000
2017-12-21 11:42:07 +01:00
parent c96201930b
commit 67e25b8102
11 changed files with 112 additions and 22 deletions

View File

@@ -207,7 +207,7 @@ gboolean update_snapshot(gpointer ignored)
char hash[MD4_HEX_SIZE + 4];
md4hexf(path, hash);
strcat(hash, ".png");
strlcat(hash, ".png", sizeof(hash));
gchar *snap = g_build_filename(g_get_user_cache_dir(), "tint2", hash, NULL);
pixbuf = force_refresh ? NULL : gdk_pixbuf_new_from_file(snap, NULL);