flowtop: Use strlcpy instead of memcpy to copy strings
commite3822bdbd11f1546b002f00cc018a612e2f3d3e5
authorTobias Klauser <tklauser@distanz.ch>
Tue, 27 Oct 2015 11:11:09 +0000 (27 12:11 +0100)
committerTobias Klauser <tklauser@distanz.ch>
Tue, 27 Oct 2015 11:11:09 +0000 (27 12:11 +0100)
tree609b1c3fae9bfd92b44fdb44b5131d2efcbb939a
parentbd031f809422ea88b9619924911aa5112f95b6b3
flowtop: Use strlcpy instead of memcpy to copy strings

Make sure we always terminate the strings with '\0'. Also only set the
first byte to '\0' instead of memset()ing the entire buffer in case no
city/country is returned.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
flowtop.c