* grub-core/kern/efi/efi.c (grub_efi_get_filename): Reset the pointer

at the start of second iteration.
This commit is contained in:
Vladimir Serbinenko 2013-11-14 15:50:43 +01:00
parent ec525c18e1
commit 83e9c273e5
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-11-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/efi/efi.c (grub_efi_get_filename): Reset the pointer
at the start of second iteration.
2013-11-14 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/Makefile.am (efiemu64.o): Explicitly set link format. * grub-core/Makefile.am (efiemu64.o): Explicitly set link format.

View file

@ -307,10 +307,13 @@ grub_efi_modules_addr (void)
#pragma GCC diagnostic error "-Wcast-align" #pragma GCC diagnostic error "-Wcast-align"
char * char *
grub_efi_get_filename (grub_efi_device_path_t *dp) grub_efi_get_filename (grub_efi_device_path_t *dp0)
{ {
char *name = 0, *p; char *name = 0, *p;
grub_size_t filesize = 0; grub_size_t filesize = 0;
grub_efi_device_path_t *dp;
dp = dp0;
while (1) while (1)
{ {
@ -334,6 +337,8 @@ grub_efi_get_filename (grub_efi_device_path_t *dp)
if (!filesize) if (!filesize)
return NULL; return NULL;
dp = dp0;
p = name = grub_malloc (filesize); p = name = grub_malloc (filesize);
if (!name) if (!name)
return NULL; return NULL;