grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix crash on open of nonexisting tar/cpio file, fix cpio tra


From: Christian Franke
Subject: Re: [PATCH] Fix crash on open of nonexisting tar/cpio file, fix cpio trailer detection
Date: Wed, 06 Feb 2008 09:07:19 +0100

Hi Robert,

you wrote:
> On Wed, Feb 06, 2008 at 12:02:37AM +0100, Christian Franke wrote:
> > Two issues found in current CVS:
> > 
> > 1. Booting a grub2-mkrescue floppy crashes if
> > "(memdisk)/boot/grub/grub.cfg" does not exist. This is because
> > grub_cpio_open does not set grub_errno if a file does not exist.
> 
> I can't reproduce this with qemu:
> 
> ./grub-mkrescue --pkglibdir=`pwd` --grub-mkimage=`pwd`/grub-mkimage
> --image-type=floppy /tmp/grub-rescue-floppy.img qemu -fda
> /tmp/grub-rescue-floppy.img -boot a
> 
> is this supposed to be a spurious problem?
> 
> 

This depends on the (random?) contents of the "file" variable.  If a
file does not exist, grub_cpio_open() returns GRUB_ERR_NONE but leaves
the file variable as is.

Accessing some non existent file ("cat (memdisk)/nosuchfile") should
eventually result in a crash.

Christian







reply via email to

[Prev in Thread] Current Thread [Next in Thread]