NetBSD-Bugs archive

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

Re: kern/55958: pciback.hide parsing error



I tracked the problem to strncpy at
  https://nxr.netbsd.org/xref/src/sys/arch/i386/stand/lib/exec.c#763
---8<---
bi = (struct bi_modulelist_entry *)(buf + off);
off += sizeof(struct bi_modulelist_entry);
strncpy(bi->path, bm->bm_path, sizeof(bi->path) - 1);
bi->base = image_end;
bi->len = len;
---8<---
The issue occurs because the static buffer size at
  https://nxr.netbsd.org/xref/src/sys/arch/x86/include/bootinfo.h#180
---8<---
struct bi_modulelist_entry
{
    char path[80];
    int type;
    int len;
    uint32_t base;
};
---8<---
is too small to accommodate module arguments line longer than 80 characters.



Home | Main Index | Thread Index | Old Index