diff options
author | marcel <marcel@FreeBSD.org> | 2003-03-01 05:13:59 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-03-01 05:13:59 +0000 |
commit | b6d91ca8936616a9e0a7d01f7a18d366d496902c (patch) | |
tree | 41c0cff65b142d05c7bd900006045bfe2a54262e | |
parent | 5944c8ff0f7012b775e938018039317aba06f202 (diff) | |
download | FreeBSD-src-b6d91ca8936616a9e0a7d01f7a18d366d496902c.zip FreeBSD-src-b6d91ca8936616a9e0a7d01f7a18d366d496902c.tar.gz |
Paranoia: Don't use the length of the option string alone to
determine whether we have command line options. We expect a
valid string pointer as well.
-rw-r--r-- | sys/boot/efi/libefi/libefi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/efi/libefi/libefi.c b/sys/boot/efi/libefi/libefi.c index 5ef97f4..abfa6a8 100644 --- a/sys/boot/efi/libefi/libefi.c +++ b/sys/boot/efi/libefi/libefi.c @@ -120,7 +120,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) * If the string is already in Unicode-16, we make a copy so that * we know we can always modify the string. */ - if (img->LoadOptionsSize) { + if (img->LoadOptionsSize > 0 && img->LoadOptions != NULL) { if (img->LoadOptionsSize == strlen(img->LoadOptions) + 1) { args = malloc(img->LoadOptionsSize << 1); for (argc = 0; argc < img->LoadOptionsSize; argc++) |