search for: 05ad3e5

Displaying 1 result from an estimated 1 matches for "05ad3e5".

2012 Feb 29
1
[PATCH 1/2] Check that directory path is not too long (found by Coverity).
...Since we copy dirname + "/" + path to a fixed buffer of size PATH_MAX, we need 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...