summaryrefslogtreecommitdiff
path: root/com32
diff options
context:
space:
mode:
authorhpa <hpa>2005-08-18 23:48:47 +0000
committerhpa <hpa>2005-08-18 23:48:47 +0000
commitf2932034058a45a8e169b6b791975253c179827b (patch)
tree9a0c7fc090b6725d8ddffb936cae0fda59656541 /com32
parentd44e897d06de45c9a91c21d71f1375efb019db17 (diff)
downloadsyslinux-f2932034058a45a8e169b6b791975253c179827b.tar.gz
Handle MENU PASSWD correctlysyslinux-3.10-pre12
Diffstat (limited to 'com32')
-rw-r--r--com32/modules/readconfig.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/com32/modules/readconfig.c b/com32/modules/readconfig.c
index 49a81af5..fccc764b 100644
--- a/com32/modules/readconfig.c
+++ b/com32/modules/readconfig.c
@@ -137,7 +137,7 @@ record(struct labeldata *ld, char *append)
me->hotkey = 0;
if ( ld->menulabel ) {
- unsigned char *p = strchr(ld->menulabel, '^');
+ unsigned char *p = (unsigned char *)strchr(ld->menulabel, '^');
if ( p && p[1] ) {
int hotkey = p[1] & ~0x20;
if ( !menu_hotkeys[hotkey] ) {
@@ -160,9 +160,15 @@ record(struct labeldata *ld, char *append)
asprintf(&me->cmdline, "%s%s%s%s", ld->kernel, ipoptions, s, a);
ld->label = NULL;
+ ld->passwd = NULL;
+
free(ld->kernel);
- if ( ld->append )
+ ld->kernel = NULL;
+
+ if ( ld->append ) {
free(ld->append);
+ ld->append = NULL;
+ }
if ( !ld->menuhide ) {
if ( me->hotkey )
@@ -235,6 +241,7 @@ void parse_config(const char *filename)
record(&ld, append);
ld.label = strdup(p);
ld.kernel = strdup(p);
+ ld.passwd = NULL;
ld.append = NULL;
ld.menulabel = NULL;
ld.ipappend = ld.menudefault = ld.menuhide = 0;