From b228fa47d2d28b5973915353d09c234f29e7fd39 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 20 Jan 2010 09:29:52 +0300 Subject: [PATCH] wine WtoA: fix crashing bug The assembly functions like the ones in libs/port/interlocked.c were causing Segmentation faults. It's been happening from the beginning but I didn't notice until now. I will update my check scripts so this doesn't happen again. Signed-off-by: Dan Carpenter --- check_wine_WtoA.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check_wine_WtoA.c b/check_wine_WtoA.c index cd84d8e3..e2cc1f79 100644 --- a/check_wine_WtoA.c +++ b/check_wine_WtoA.c @@ -26,8 +26,13 @@ static int in_w = 0; static void match_function_def(struct symbol *sym) { char *func = get_function(); - int len = strlen(func); + int len; + if (!func) { + in_w = 0; + return; + } + len = strlen(func); if (func[len - 1] == 'W' && len > 2 && func[len - 2] != 'A' ) in_w = 1; else -- 2.11.4.GIT