Date: Thu, 7 Nov 2019 10:38:20 -0500 From: Phil Shafer <phil@juniper.net> To: Arnaud Ysmal <a@stacktic.org> Cc: <david@catwhisker.org>, <freebsd-current@freebsd.org>, <phil@freebsd.org> Subject: Re: Segmentation fault in netstat after r354373 -> r354373 update Message-ID: <0FC9A86B-95E4-427E-AF7E-518470C995B2@juniper.net> In-Reply-To: <cc5c473e58f7b727e056fad14670d823@stacktic.org> References: <cc5c473e58f7b727e056fad14670d823@stacktic.org>
next in thread | previous in thread | raw e-mail | index | archive | help
My bad. Will role a fix asap. Thanks, Phil On 7 Nov 2019, at 10:08, Arnaud Ysmal wrote: > Hi, > > I just got the same issue, it happens when argv[0] does not contain a > / (calling uptime segfault but calling /usr/bin/uptime works). > > In xo_parse_args there is no check whether cp is NULL before calling > xo_streq. > > I fixed it by changing this line: > - cp = &cp[len + 1 - sizeof(gnu_ext)]; > + cp = (char *)(uintptr_t)(const char *)(&xo_program[len + 1 - > sizeof(gnu_ext)]); > > Arnaud Ysmal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0FC9A86B-95E4-427E-AF7E-518470C995B2>