mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-14 23:07:59 +02:00
Problem: Several problems found by Coverity Static Analyzer
Solution: The Coverity Static Code Analyzer was used on libzmq code and found many issues with uninitialized member variables, some redefinition of variables hidding previous instances of same variable name and a couple of functions where return values were not checked, even though all other occurrences were checked (e.g. init_size() return).
This commit is contained in:
@@ -173,7 +173,8 @@ int zmq::xpub_t::xsetsockopt (int option_, const void *optval_,
|
||||
welcome_msg.close();
|
||||
|
||||
if (optvallen_ > 0) {
|
||||
welcome_msg.init_size(optvallen_);
|
||||
int rc = welcome_msg.init_size(optvallen_);
|
||||
errno_assert(rc == 0);
|
||||
|
||||
unsigned char *data = (unsigned char*)welcome_msg.data();
|
||||
memcpy(data, optval_, optvallen_);
|
||||
|
Reference in New Issue
Block a user