From: Ruben Kerkhof Date: Fri, 14 Dec 2018 16:28:37 +0000 (+0100) Subject: libcollectdclient: fix minor cosmetic issue X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=92c4393cdedc12c553363d19658339966fec1a59;p=collectd.git libcollectdclient: fix minor cosmetic issue String should be NUL-terminated, so compare with the NUL char --- diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c index 14e8be57..4c610bb0 100644 --- a/src/libcollectdclient/network_parse.c +++ b/src/libcollectdclient/network_parse.c @@ -154,7 +154,7 @@ static int parse_string(void *payload, size_t payload_size, char *out, size_t out_size) { char *in = payload; - if ((payload_size < 1) || (in[payload_size - 1] != 0) || + if ((payload_size < 1) || (in[payload_size - 1] != '\0') || (payload_size > out_size)) return EINVAL;