projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28c83da
)
libcollectdclient: fix minor cosmetic issue
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 14 Dec 2018 16:28:37 +0000
(17:28 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Thu, 7 Feb 2019 09:59:14 +0000
(10:59 +0100)
String should be NUL-terminated, so compare with the NUL char
src/libcollectdclient/network_parse.c
patch
|
blob
|
history
diff --git
a/src/libcollectdclient/network_parse.c
b/src/libcollectdclient/network_parse.c
index
14e8be5
..
4c610bb
100644
(file)
--- 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;