]> git.itanic.dy.fi Git - rrdd/commit
onewire_parser: Ensure proper strng NULL handling
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 1 Nov 2016 19:02:00 +0000 (21:02 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 1 Nov 2016 19:02:00 +0000 (21:02 +0200)
commit247b9c8873ea60fd3d67c85eb730e088a35cdac5
tree3754b4c0fb9e6f1f190ba7e62d11910186d6972d
parent8601dc1c9df7c7fe544cfd8ea6aa83830443d549
onewire_parser: Ensure proper strng NULL handling

strncpy() call length argument must be one less than the actual buffer
length. The final byte in buffer must be NULL, in case strncpy does
not fill it with NULL itself.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
onewire_parser.c