[syslinux] Missing Error Condition Check in core/fs/fs.c
H. Peter Anvin
hpa at zytor.com
Tue Aug 2 11:24:36 PDT 2011
On 08/02/2011 12:10 AM, Shao Miller wrote:
> In 'core/fs/fs.c', 'fs.root' is set, but the 'iget_root' function
> pointer call might return a null pointer and we don't check for it. A
> symptom was that QEmu crashed as EIP landed outside of memory. - Shao
>
>
> /* start out in the root directory */
> if (fs.fs_ops->iget_root) {
> fs.root = fs.fs_ops->iget_root(&fs);
> /* Maybe we should check 'fs.root' here */
> fs.cwd = get_inode(fs.root);
> }
>
We're kind of dead if we can't get the root directory, no?
I guess we should panic at that point...
-hpa
More information about the Syslinux
mailing list