On Fri, Apr 23, 2021 at 3:16 PM Philippe Mathieu-Daudé <f4...@amsat.org>
wrote:

> On 4/23/21 10:39 PM, i...@bsdimp.com wrote:
> > From: Warner Losh <i...@bsdimp.com>
> >
> > Signed-off-by: Warner Losh <i...@bsdimp.com>
> > ---
> >  bsd-user/main.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/bsd-user/main.c b/bsd-user/main.c
> > index 69e5525607..95fda8c5ae 100644
> > --- a/bsd-user/main.c
> > +++ b/bsd-user/main.c
> > @@ -821,7 +821,7 @@ int main(int argc, char **argv)
> >              }
> >          } else if (!strcmp(r, "s")) {
> >              r = argv[optind++];
> > -            x86_stack_size = strtol(r, (char **)&r, 0);
> > +            x86_stack_size = qemu_strtol(r, (char **)&r, 0);
> >              if (x86_stack_size <= 0) {
> >                  usage();
> >              }
> > @@ -853,7 +853,7 @@ int main(int argc, char **argv)
> >                  exit(1);
> >              }
> >          } else if (!strcmp(r, "B")) {
> > -            guest_base = strtol(argv[optind++], NULL, 0);
> > +            guest_base = qemu_strtol(argv[optind++], NULL, 0);
>
> Missing error check (-EINVAL & -ERANGE).
>

Thanks! Will update.


> >              have_guest_base = true;
> >          } else if (!strcmp(r, "drop-ld-preload")) {
> >              (void) envlist_unsetenv(envlist, "LD_PRELOAD");
> >
>
>

Reply via email to