search for: iterate_input_directory

Displaying 2 results from an estimated 2 matches for "iterate_input_directory".

2012 Feb 29
1
[PATCH 1/2] Check that directory path is not too long (found by Coverity).
...ed to check that the buffer cannot overflow. --- helper/appliance.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/helper/appliance.c b/helper/appliance.c index c4d0b32..05ad3e5 100644 --- a/helper/appliance.c +++ b/helper/appliance.c @@ -168,15 +168,23 @@ iterate_input_directory (const char *dirname, int dirfd, struct writer *writer) sort (entries, string_compare); char path[PATH_MAX]; - strcpy (path, dirname); + char *inputs[] = { path }; size_t len = strlen (dirname); + + if (len + 1 >= PATH_MAX) + error (EXIT_FAILURE, 0, "%s: directory name too...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...e <sys/stat.h> -#include <assert.h> - -#include "error.h" -#include "fts_.h" -#include "xalloc.h" -#include "xvasprintf.h" - -#include "helper.h" - -static void iterate_inputs (char **inputs, int nr_inputs, struct writer *); -static void iterate_input_directory (const char *dirname, int dirfd, struct writer *); -static void add_kernel_modules (const char *whitelist, const char *modpath, struct writer *); -static void add_hostfiles (const char *hostfiles_file, struct writer *); - -/* Create the appliance. - * - * The initrd consists of these components con...