projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f77b58
)
src/utils_parse_option.c: Check for the terminating null-byte, too.
author
Florian Forster
<octo@noris.net>
Thu, 21 Aug 2008 07:38:18 +0000
(09:38 +0200)
committer
Florian Forster
<octo@noris.net>
Thu, 21 Aug 2008 07:38:18 +0000
(09:38 +0200)
I was so focused on values with spaces, that I forgot to test trivial
cases :/
src/utils_parse_option.c
patch
|
blob
|
history
diff --git
a/src/utils_parse_option.c
b/src/utils_parse_option.c
index
06e9f28
..
6ed2301
100644
(file)
--- a/
src/utils_parse_option.c
+++ b/
src/utils_parse_option.c
@@
-100,7
+100,7
@@
int parse_option (char **ret_buffer, char **ret_key, char **ret_value)
else /* an unquoted value */
{
buffer = value;
- while (!isspace ((int) *buffer))
+ while (
(*buffer != 0) &&
!isspace ((int) *buffer))
buffer++;
if (*buffer != 0)
{