Re: potentially uninitialized string printed by vmd

2021-05-11 Thread Mike Larkin
On Mon, Mar 15, 2021 at 09:29:29AM +, James Cook wrote: > > The array "base" which is passed to log_warnx might be uninitialized: > > virtio_get_base doesn't necessarily touch it if it returns -1. Maybe it > > would be better just omit base from the output, e.g. > > > > log_warnx("vm \"%s\"

Re: potentially uninitialized string printed by vmd

2021-03-15 Thread James Cook
> The array "base" which is passed to log_warnx might be uninitialized: > virtio_get_base doesn't necessarily touch it if it returns -1. Maybe it > would be better just omit base from the output, e.g. > > log_warnx("vm \"%s\" unable to read " > "base for disk %s", vcp->vcp_name, >

potentially uninitialized string printed by vmd

2021-03-15 Thread James Cook
Hi tech@, I'm looking at this code starting at line 390 of usr.sbin/vmd/config.c: n = virtio_get_base(diskfds[i][j], base, sizeof(base), vmc->vmc_disktypes[i], path); if (n == 0) break; if (n == -1) { log_warnx("vm \"%s\" unable