Svante Signell, le Tue 21 Oct 2014 12:34:22 +0200, a écrit :
> static gboolean
> asb_utils_is_file_in_tmpdir (const gchar *tmpdir, const gchar *filename)
> {
> - gchar tmp[PATH_MAX];
> - g_snprintf (tmp, PATH_MAX, "%s/%s", tmpdir, filename);
> + gsize len = strlen (tmpdir) + 1 + strlen (filename) + 1;
> + gchar tmp = g_malloc (len);
> + g_snprintf (tmp, len, "%s/%s", tmpdir, filename);
> return g_file_test (tmp, G_FILE_TEST_EXISTS);
> }
This is missing a free.
Samuel
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive:
https://lists.debian.org/[email protected]