diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2019-10-02 10:59:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 10:59:48 +0000 |
commit | f197e2d9901be1b462edd53b227e01f5d7a9483a (patch) | |
tree | ea1d3cd229de5d84a7696a9275af7b1fd2c6cf06 /daemon | |
parent | 1d667b145c16811639143afa377293d3ef8d62f0 (diff) |
Coverity 20190924 (#6941)
* coverity_20190924: Fix 215633
In the switch the library stops case this pointer is NULL, so
there is not necessity to processed with tests
* coverity_20190924: Fix 338067
The current code tries to copy the same size of the variable, another possible
solution would be to use a function to sanitize the code, I will try this first
* coverity_20190924: Fix 348638
Considering that we are testing the variable value one line above
The division will always happen
* coverity_20190924: Fix 348640
For this specific case we do not have the possibility to have memory
leak, valgrind confirms this, but I am adding a new variable here to the
stack to discard the warning
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/main.c b/daemon/main.c index bd0970fddc..a599167f78 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -719,7 +719,7 @@ int get_system_info(struct rrdhost_system_info *system_info) { } char n[51], v[101]; snprintfz(n, 50,"%s",name); - snprintfz(v, 101,"%s",value); + snprintfz(v, 100,"%s",value); if(unlikely(rrdhost_set_system_info_variable(system_info, n, v))) { info("Unexpected environment variable %s=%s", n, v); } |