summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-21 21:36:44 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-07-22 12:58:01 -0400
commitc86aca6b49cb335fba1f9cf96f1ce5b7d18dba2f (patch)
treed500348fae39c07bb63e9f2440823486251684c3
parentf8d4f8a641d0b397c4e57beb8de8fd3812e07b18 (diff)
downloadsyslinux-c86aca6b49cb335fba1f9cf96f1ce5b7d18dba2f.tar.gz
vesamenu: avoid strcmp() with NULL
Avoid touching memory at address zero when going from a background to a non-background.
-rw-r--r--com32/menu/background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/menu/background.c b/com32/menu/background.c
index 49839cdc..fa034418 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;