Displaying 2 results from an estimated 2 matches for "tmpdir_len".
Did you mean:
tmp_in_len
2019 Sep 05
2
[PATCH nbdkit] Ban use of stack Variable Length Arrays (VLAs).
...WARNINGS_CFLAGS="-Wall -Wshadow -Wvla -Werror"
AC_SUBST([WARNINGS_CFLAGS])
fi
diff --git a/plugins/sh/sh.c b/plugins/sh/sh.c
index c73b08b..acb50c4 100644
--- a/plugins/sh/sh.c
+++ b/plugins/sh/sh.c
@@ -74,8 +74,7 @@ sh_load (void)
static void
sh_unload (void)
{
- const size_t tmpdir_len = strlen (tmpdir);
- char cmd[7 + tmpdir_len + 1]; /* "rm -rf " + tmpdir + \0 */
+ CLEANUP_FREE char *cmd = NULL;
/* Run the unload method. Ignore all errors. */
if (script) {
@@ -85,8 +84,8 @@ sh_unload (void)
}
/* Delete the temporary directory. Ignore all errors. */...
2019 Sep 05
0
Re: [PATCH nbdkit] Ban use of stack Variable Length Arrays (VLAs).
...e need to probe at configure time on which
options we can safely use, instead of merely open-coding a list, but
we'll deal with that when it breaks the build.
> +++ b/plugins/sh/sh.c
> @@ -74,8 +74,7 @@ sh_load (void)
> static void
> sh_unload (void)
> {
> - const size_t tmpdir_len = strlen (tmpdir);
> - char cmd[7 + tmpdir_len + 1]; /* "rm -rf " + tmpdir + \0 */
> + CLEANUP_FREE char *cmd = NULL;
>
> /* Run the unload method. Ignore all errors. */
> if (script) {
> @@ -85,8 +84,8 @@ sh_unload (void)
> }
>
> /* Delete th...