net: use scnprintf() to avoid potential buffer overflow