* grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
infinite loop on corrupted FS.
This commit is contained in:
parent
e77a16ca02
commit
cc1ce5f9b4
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
|
||||
infinite loop on corrupted FS.
|
||||
|
||||
2012-12-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix big-endian mtime.
|
||||
|
|
|
@ -664,6 +664,9 @@ grub_ufs_dir (grub_device_t device, const char *path,
|
|||
(char *) &dirent) < 0)
|
||||
break;
|
||||
|
||||
if (dirent.direntlen == 0)
|
||||
break;
|
||||
|
||||
#ifdef MODE_UFS2
|
||||
namelen = dirent.namelen_bsd;
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue