From 816f3fc95a0098c435c314735e3b1d96729e8e7e Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Tue, 3 Apr 2012 16:17:17 +0100 Subject: [PATCH] elflink: Allocate space for 'realname' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit search_dirs() expects the 'realname' argument to point to space allocated for storing the real path name. Currently we're passing an uninitialized pointer which was highlighted by the following build warning, elflink/load_env32.c:155:18: warning: ‘realname’ may be used uninitialized in this function Signed-off-by: Matt Fleming --- core/elflink/load_env32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c index 51929c8..566035b 100644 --- a/core/elflink/load_env32.c +++ b/core/elflink/load_env32.c @@ -109,7 +109,7 @@ void load_env32(com32sys_t * regs) struct file_info *fp; int fd; char *argv[] = { LDLINUX, NULL }; - char *realname; + char realname[FILENAME_MAX]; static const char *search_directories[] = { "/boot/isolinux", -- 2.7.4