]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Add secure gethostname() wrapper
authorBlazej Kucman <blazej.kucman@intel.com>
Fri, 16 Jun 2023 19:45:55 +0000 (21:45 +0200)
committerJes Sorensen <jes@trained-monkey.org>
Fri, 1 Sep 2023 15:38:44 +0000 (11:38 -0400)
commit21e622f214a38c048c5689158bc6314a91a46e40
tree1767839540cfe77cdf669686a81a6e010a561ce1
parent1dea84ae38288fbefa04d9fda2b3f36c21a9e1bd
Add secure gethostname() wrapper

gethostname() func does not ensure null-terminated string
if hostname is longer than buffer length.
For security, a function s_gethostname() has been added
to ensure that "\0" is added to the end of the buffer.
Previously this had to be handled in each place
of the gethostname() call.

Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Monitor.c
lib.c
mapfile.c
mdadm.c
mdadm.h
super-ddf.c