Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch/i386/stand/efiboot
On Mon, Dec 27, 2021 at 10:54:13PM +1100, Simon Burge wrote:
> If you have a way of preproducing this, I'm happy to have a look.
I recall it now.
In src/sys/arch/i386/stand/efiboot/devopen.c
bios2dev(boot_biosdev, boot_biossector, &devname, &unit,
&partition, NULL);
In the same file, bios2dev() passes NULL part_name to biosdisk_findpartition()
void
bios2dev(int biosdev, daddr_t sector, char **devname, int *unit,
int *partition, const char **part_name)
{
(...)
(void)biosdisk_findpartition(biosdev, sector, partition, part_name);
In src/sys/arch/i386/stand/lib/biosdisk.c
int
biosdisk_findpartition(int biosdev, daddr_t sector,
int *partition, const char **part_name)
{
(...)
/* default ot first partition */
*partition = 0;
*part_name = NULL;
part_name is NULL, *part_name crashes. How do you avoid that?
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index