w -sf and w -si segfault when systemd support is enabled
To reproduce: configure with systemd support, and run w -sf
or w -si
.
My attempt at diagnosing the issue:
- On line 831,
showinfo
is called with utmp =NULL
- On line 622,
print_from
is called with session =NULL
- With neither utmp or session,
print_from
dereferences a null pointer
I'm not too familiar with the code base, but a conditional check to pass the session like on line 581 might fix the issue.