From d4b9d1ef7b0913237ed03d24a9744c54ea579042 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 26 Feb 2012 01:22:36 +0000 Subject: (try_with_device) fix segfaulting when ISO directory is not valid (mga#4592) (use our new non segfaulting dirname() implementation) also do not include string.h twice --- mdk-stage1/disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mdk-stage1/disk.c') diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c index c2b71dbfc..804c8ea2b 100644 --- a/mdk-stage1/disk.c +++ b/mdk-stage1/disk.c @@ -19,14 +19,14 @@ * */ +#define _GNU_SOURCE /* We want the non segfaulting my_dirname() -- See dirname(3) */ +#include #include #include #include -#include #include #include #include -#include #include #include "stage1.h" #include "frontend.h" @@ -155,7 +155,7 @@ static enum return_type try_with_device(char *dev_name) char * path = strdup(answers_location[0]); stg1_error_message("Directory or ISO image file could not be found on partition.\n" "Here's a short extract of the files in the directory %s:\n" - "%s", dirname(path), extract_list_directory(dirname(location_full))); + "%s", my_dirname(path), extract_list_directory(my_dirname(location_full))); free(path); goto ask_dir; } -- cgit v1.2.1