summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c2336d)
raw | patch | inline | side by side (parent: 7c2336d)
author | Florian Forster <octo@collectd.org> | |
Wed, 15 Nov 2017 21:26:11 +0000 (22:26 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 17 Nov 2017 12:23:40 +0000 (13:23 +0100) |
That size_t is then used to declare Variable Length Arrays. Hopefully
this helps to convince Coverity that pkg_values and pkg_values_types are
actually fully initialized.
CID: 141009, 141010
this helps to convince Coverity that pkg_values and pkg_values_types are
actually fully initialized.
CID: 141009, 141010
src/libcollectdclient/network_buffer.c | patch | blob | history |
index 662265d97996d309ef45391dab28079975d2fac6..a0f8cfdc3cfa74ae36d9954ceb1955c993338770 100644 (file)
static int nb_add_values(char **ret_buffer, /* {{{ */
size_t *ret_buffer_len, const lcc_value_list_t *vl) {
+ if ((vl == NULL) || (vl->values_len < 1)) {
+ return EINVAL;
+ }
+
char *packet_ptr;
size_t packet_len;