[ https://issues.apache.org/jira/browse/TS-4906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leif Hedstrom updated TS-4906: ------------------------------ Assignee: Phil Sorber (was: Brian Geffon) > CID 1363288, 1363289 and 1363290: lib/atscppapi/examples/websocket/WSBuffer.cc > ------------------------------------------------------------------------------ > > Key: TS-4906 > URL: https://issues.apache.org/jira/browse/TS-4906 > Project: Traffic Server > Issue Type: Bug > Components: CPP API > Reporter: Leif Hedstrom > Assignee: Phil Sorber > Fix For: 7.1.0 > > > From coverity: > {code} > *** CID 1363290: Uninitialized members (UNINIT_CTOR) > /lib/atscppapi/examples/websocket/WSBuffer.cc: 54 in WSBuffer::WSBuffer()() > 48 #define WS_DIGEST_MAX BASE64_ENCODE_DSTLEN(20) > 49 > 50 static const std::string magic = > "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; > 51 > 52 WSBuffer::WSBuffer() > 53 { > CID 1363290: Uninitialized members (UNINIT_CTOR) > Non-static class member "frame_" is not initialized in this constructor > nor in any functions that it calls. > 54 } > 55 > 56 void > 57 WSBuffer::buffer(std::string const &data) > 58 { > 59 ws_buf_ += data; > ** CID 1363289: Error handling issues (CHECKED_RETURN) > /lib/ts/HashMD5.cc: 36 in ATSHashMD5::update(const void *, unsigned long)() > ________________________________________________________________________________________________________ > *** CID 1363289: Error handling issues (CHECKED_RETURN) > /lib/ts/HashMD5.cc: 36 in ATSHashMD5::update(const void *, unsigned long)() > 30 } > 31 > 32 void > 33 ATSHashMD5::update(const void *data, size_t len) > 34 { > 35 if (!finalized) { > CID 1363289: Error handling issues (CHECKED_RETURN) > Calling "EVP_DigestUpdate" without checking return value (as is done > elsewhere 4 out of 5 times). > 36 EVP_DigestUpdate(ctx, data, len); > 37 } > 38 } > 39 > 40 void > 41 ATSHashMD5::final(void) > ** CID 1363288: Error handling issues (CHECKED_RETURN) > /lib/atscppapi/examples/websocket/WSBuffer.cc: 184 in > WSBuffer::ws_digest(const std::basic_string<char, std::char_traits<char>, > std::allocator<char>>&)() > ________________________________________________________________________________________________________ > *** CID 1363288: Error handling issues (CHECKED_RETURN) > /lib/atscppapi/examples/websocket/WSBuffer.cc: 184 in > WSBuffer::ws_digest(const std::basic_string<char, std::char_traits<char>, > std::allocator<char>>&)() > 178 return "bad-hash-length"; > 179 } > 180 > 181 char digest_buf[WS_DIGEST_MAX]; > 182 size_t digest_len = 0; > 183 > CID 1363288: Error handling issues (CHECKED_RETURN) > Calling "TSBase64Encode" without checking return value (as is done > elsewhere 4 out of 5 times). > 184 TSBase64Encode((char *)hash_buf, hash_len, digest_buf, > WS_DIGEST_MAX, &digest_len); > 185 > 186 return std::string((char *)digest_buf, digest_len); > 187 } > 188 > 189 std::string > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)