nodelist: Use safe string functions in describe.c

Rewrite format_node_description() and router_get_verbose_nickname() to
use strlcpy() and strlcat(). The previous implementation used memcpy()
and pointer arithmetic, which was error-prone.

Closes ticket 31545. This is CID 1452819.
This commit is contained in:
teor
2019-08-29 12:39:44 +10:00
parent 04ab357df8
commit ec6fbf1ca6
2 changed files with 84 additions and 22 deletions
+5
View File
@@ -0,0 +1,5 @@
o Code simplification and refactoring:
- Rewrite format_node_description() and router_get_verbose_nickname() to
use strlcpy() and strlcat(). The previous implementation used memcpy()
and pointer arithmetic, which was error-prone.
Closes ticket 31545. This is CID 1452819.