diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-21 21:36:44 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-22 12:58:01 -0400 |
commit | c86aca6b49cb335fba1f9cf96f1ce5b7d18dba2f (patch) | |
tree | d500348fae39c07bb63e9f2440823486251684c3 | |
parent | f8d4f8a641d0b397c4e57beb8de8fd3812e07b18 (diff) | |
download | syslinux-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.c | 2 |
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; |