[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub-install crash on GNU/Hurd
From: |
Samuel Thibault |
Subject: |
grub-install crash on GNU/Hurd |
Date: |
Sun, 29 Nov 2009 02:00:43 +0100 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Hello,
grub-install crashes on GNU/Hurd on the stat call in probe():
if (print == PRINT_FS)
{
struct stat st;
stat (path, &st);
if (S_ISREG (st.st_mode))
because when grub-probe is passed --device /dev/hd0, path is NULL.
This doesn't get noticed on Linux because it returns EFAULT instead of
crashing, and by luck S_ISREG() is false.
Do people agree on the attached patch, i.e. check that the path is
readable only if --device was not given?
Samuel
patch
Description: Text document
- grub-install crash on GNU/Hurd,
Samuel Thibault <=