Segmentation fault in netstat after r354373 -> r354373 update
Phil Shafer
phil at juniper.net
Thu Nov 7 15:36:14 UTC 2019
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
More information about the freebsd-current
mailing list