X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=4da8feee853ce3ac525157884371a01e7f744ea3;hb=5321d69f67ad156531abe32d04745d99400b4af0;hp=7adbe2ea7dd984e9ade3ad6d7daee2709fcc0cca;hpb=42a62db99c96d77fd6dc676b76705d8d90156c23;p=collectd.git diff --git a/src/common.c b/src/common.c index 7adbe2ea..4da8feee 100644 --- a/src/common.c +++ b/src/common.c @@ -274,7 +274,7 @@ ssize_t swrite (int fd, const void *buf, size_t count) /* checking for closed peer connection */ pfd.fd = fd; - pfd.events = POLLIN | POLLHUP | POLLRDNORM; + pfd.events = POLLIN | POLLHUP; pfd.revents = 0; if (poll(&pfd, 1, 0) > 0) { char buffer[32]; @@ -1104,6 +1104,9 @@ int parse_values (char *buffer, value_list_t *vl, const data_set_t *ds) char *ptr; char *saveptr; + if ((buffer == NULL) || (vl == NULL) || (ds == NULL)) + return EINVAL; + i = -1; dummy = buffer; saveptr = NULL;