]> Savannah Git Hosting - gnulib.git/commit
readutmp: fix core dump if --enable-systemd
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 31 Aug 2023 01:26:52 +0000 (18:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 31 Aug 2023 01:27:27 +0000 (18:27 -0700)
commit1e6a26f9312bb47e070f94b17b14dc1a6ffbb74f
tree2731d0ea62ea4ad84c22fc1ba3cbf1a965f2455a
parent6674810815912a828bd9a509e0041ee203c88487
readutmp: fix core dump if --enable-systemd

Problem reported by Thorsten Kukuk <https://bugs.gnu.org/65617>.
* lib/readutmp.c (read_utmp_from_systemd):
Don’t assume session_ptr != NULL if num_sessions == 0.
In practice it can be null, and the man page OKs this behavior.
ChangeLog
lib/readutmp.c