]> git.ipfire.org Git - thirdparty/pdns.git/commit
misc.cc: Resize hostname to final size in getCarbonHostname()
authorAki Tuomi <cmouse@cmouse.fi>
Sun, 19 Jul 2020 15:06:14 +0000 (18:06 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Tue, 21 Jul 2020 19:14:14 +0000 (22:14 +0300)
commit57f8ac68b4fa7063fd2cac4d5b77045e0255c770
tree6966b8b36735183f284f087f3b8d60f4ce601503
parent9a6804d43f710ad9df3ef6f7ccb7e74077d9d086
misc.cc: Resize hostname to final size in getCarbonHostname()

In 5c21b47fbc35ddcb8d939eb8541c6c3bad1080a8 we change how
hostname is allocated. We allocate getMaxHostNameSize for string,
then give the raw buffer for gethostname function, but forget to
resize the string into actual result length, causing the carbon
output to include trailing NUL bytes after hostname.
pdns/misc.cc