Re: Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread Phil Shafer
+++ b/libxo/libxo.c @@ -8104,6 +8104,8 @@ xo_parse_args (int argc, char **argv) cp = strrchr(xo_program, '/'); if (cp) xo_program = ++cp; +else + cp = argv[0]; /* Reset to front of string */ /* GNU tools add an annoying ".test" as the program extension;

Re: Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread Phil Shafer
On 7 Nov 2019, at 11:03, Arnaud Ysmal wrote: > Looks cleaner than the unconst. I've spun a new release (1.3.1) and am importing it now. Building... Thanks, Phil ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinf

Re: Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread Phil Shafer
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 c

Re: Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread Arnaud Ysmal
Looks cleaner than the unconst. Le 7 novembre 2019 16:40:04 GMT+01:00, Phil Shafer a écrit : >+++ b/libxo/libxo.c >@@ -8104,6 +8104,8 @@ xo_parse_args (int argc, char **argv) > cp = strrchr(xo_program, '/'); > if (cp) > xo_program = ++cp; >+else >+ cp = argv[0];

Re: Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread David Wolfskill
On Thu, Nov 07, 2019 at 04:08:28PM +0100, 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. >

re: Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread Arnaud Ysmal
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

Segmentation fault in netstat after r354373 -> r354373 update

2019-11-07 Thread David Wolfskill
(I haven't started to look for a culprit yet; thought I'd let folks know about it first. -- dhw) g1-49(13.0-C)[1] uname -a FreeBSD g1-49.catwhisker.org 13.0-CURRENT FreeBSD 13.0-CURRENT #514 r354436M/354436: Thu Nov 7 04:15:23 PST 2019 r...@g1-49.catwhisker.org:/common/S4/obj/usr/src/amd64