From c86aca6b49cb335fba1f9cf96f1ce5b7d18dba2f Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 21 Jul 2008 21:36:44 -0400 Subject: [PATCH] vesamenu: avoid strcmp() with NULL Avoid touching memory at address zero when going from a background to a non-background. --- com32/menu/background.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com32/menu/background.c b/com32/menu/background.c index 49839cd..fa03441 100644 --- a/com32/menu/background.c +++ b/com32/menu/background.c @@ -18,7 +18,7 @@ const char *current_background = NULL; void set_background(const char *new_background) { - if (!current_background || + if (!current_background || !new_background || strcmp(current_background, new_background)) { draw_background(new_background); current_background = new_background; -- 2.7.4