From f97636bc494bef29073ed441e27ca8bd1f89c178 Mon Sep 17 00:00:00 2001 From: James Larrowe Date: Sat, 12 Jan 2019 17:01:08 -0500 Subject: [PATCH] winebuild: Fix a segmentation fault. When 'winebuild' is called with no arguments, the make_c_identifier function is passed a null pointer, which is dereferenced and causes a segmentation fault. Signed-off-by: James Larrowe Signed-off-by: Alexandre Julliard --- tools/winebuild/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 70f381c7271..b2f5c959c42 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -164,7 +164,7 @@ static void init_dll_name( DLLSPEC *spec ) spec->dll_name = xstrdup( spec->file_name ); if ((p = strrchr( spec->dll_name, '.' ))) *p = 0; } - spec->c_name = make_c_identifier( spec->dll_name ); + if (spec->dll_name) spec->c_name = make_c_identifier( spec->dll_name ); } /* set the dll subsystem */