nss-myhostname: do not apply non-zero offset to null pointer
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Dec 2021 00:13:00 +0000 (09:13 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 19:01:39 +0000 (20:01 +0100)
commit05189e8c961c6b4ac8ef79c8911cb56965a5034f
tree3931ea150badfd6a43f1356acb0ea5f211ea07a6
parent649e83bb995eb067cce3e70f50e5d3ab54c9d47d
nss-myhostname: do not apply non-zero offset to null pointer

Fixes https://github.com/systemd/systemd/issues/21935#issuecomment-1003216503.

(cherry picked from commit 92e9df9ca031b9b04487a46afd986ab3122183fd)
(cherry picked from commit a473bfb4332ad6b0a0894135c4de0f8cc324d378)
src/nss-myhostname/nss-myhostname.c