mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Allow NULL dlabel path argument without accessing page zero.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@565 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -57,7 +57,7 @@ dlabel_close( dlabel_info_t *di )
|
||||
static void
|
||||
dlabel_open( dlabel_info_t *di )
|
||||
{
|
||||
char *s, *filename;
|
||||
const char *s, *filename;
|
||||
char *path;
|
||||
char block0[512];
|
||||
phandle_t ph;
|
||||
@@ -65,6 +65,9 @@ dlabel_open( dlabel_info_t *di )
|
||||
xt_t xt;
|
||||
|
||||
path = my_args_copy();
|
||||
if (!path) {
|
||||
path = strdup("");
|
||||
}
|
||||
DPRINTF("dlabel-open '%s'\n", path );
|
||||
|
||||
/* open disk interface */
|
||||
|
||||
Reference in New Issue
Block a user