Date: Thu, 07 Nov 2019 16:08:28 +0100 From: Arnaud Ysmal <a@stacktic.org> To: david@catwhisker.org Cc: freebsd-current@freebsd.org, phil@FreeBSD.org Subject: re: Segmentation fault in netstat after r354373 -> r354373 update Message-ID: <cc5c473e58f7b727e056fad14670d823@stacktic.org>
next in thread | raw e-mail | index | archive | help
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?cc5c473e58f7b727e056fad14670d823>