netsniff-ng: Explicitely NULL-terminate readlink() result buffer
commit87103d95678b0e6c784909e0bc610ed7ae02d2c9
authorTobias Klauser <tklauser@distanz.ch>
Tue, 7 Apr 2015 11:56:13 +0000 (7 13:56 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Tue, 7 Apr 2015 11:56:13 +0000 (7 13:56 +0200)
treef7980884f3f7d3e272fce6591f8da7aba5245e7d
parent6c5d0caf3b7c099232c1ac428407fbf31287d77a
netsniff-ng: Explicitely NULL-terminate readlink() result buffer

Commit 6c5d0caf3b7c ("netsniff-ng: Fix process name when sniffing nlmon
device") fixed the problem of not NULL-terminating the readlink() result
buffer by initializing the entire buffer with '\0'.

Switch to the more common and better readable idiom of explicitely
writing a NULL byte after the readlink result string to make this more
obvious. Also change the buffer size to PATH_MAX.

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