]> git.ipfire.org Git - thirdparty/hostap.git/commit
Silence static analyzer warning about null termination of a string
authorJouni Malinen <j@w1.fi>
Sun, 7 Jul 2019 07:02:40 +0000 (10:02 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 7 Jul 2019 07:07:10 +0000 (10:07 +0300)
commit4eab36595e180bd285229f5497cfc05c0fccc545
tree34f7857ea507863c752ff483688e3e4e8cd2af77
parentd3a035169bbc6a67a98461dda1345a3f992c561f
Silence static analyzer warning about null termination of a string

The buf[] array is initialized to zeros, so it was already null
terminated since the read() call did not allow the last character of the
buffer to be overwritten. Since that was apparently not enough to make
some static analyzers understand the design, use explicit null
termination after a successful read() call.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/utils/wpa_debug.c