networkmap: Safeguard against more potential buffer overruns