This fixes two possible situations where strncpy() produces a not null
terminated buffer.
Coverity IDs:
* 1412247 Buffer not null terminated
* 1412279 Buffer not null terminated
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Jo-Philipp Wich <jo@mein.io>