"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/libnetxms/msgrecv.cpp" between
netxms-3.8.382.tar.gz and netxms-3.8.405.tar.gz

About: NetXMS is a multi-platform open source network management and monitoring system.

msgrecv.cpp  (netxms-3.8.382):msgrecv.cpp  (netxms-3.8.405)
skipping to change at line 69 skipping to change at line 69
size_t msgSize = (size_t)ntohl(((NXCP_MESSAGE *)m_buffer)->size); size_t msgSize = (size_t)ntohl(((NXCP_MESSAGE *)m_buffer)->size);
if ((msgSize < NXCP_HEADER_SIZE) || (msgSize % 8 != 0)) if ((msgSize < NXCP_HEADER_SIZE) || (msgSize % 8 != 0))
{ {
// impossible value in message size field, assuming garbage on input // impossible value in message size field, assuming garbage on input
*protocolError = true; *protocolError = true;
} }
else if (msgSize <= m_dataSize) else if (msgSize <= m_dataSize)
{ {
if (ntohs(reinterpret_cast<NXCP_MESSAGE*>(m_buffer)->code) == CMD_ENCRY PTED_MESSAGE) if (ntohs(reinterpret_cast<NXCP_MESSAGE*>(m_buffer)->code) == CMD_ENCRY PTED_MESSAGE)
{ {
if (m_encryptionContext) // cannot use != nullptr because HP-UX com piler does not understand it if (m_encryptionContext != nullptr)
{ {
if (m_decryptionBuffer == nullptr) if (m_decryptionBuffer == nullptr)
m_decryptionBuffer = MemAllocArrayNoInit<BYTE>(m_size); m_decryptionBuffer = MemAllocArrayNoInit<BYTE>(m_size);
if (m_encryptionContext->decryptMessage(reinterpret_cast<NXCP_ENC RYPTED_MESSAGE*>(m_buffer), m_decryptionBuffer)) if (m_encryptionContext->decryptMessage(reinterpret_cast<NXCP_ENC RYPTED_MESSAGE*>(m_buffer), m_decryptionBuffer))
{ {
msg = NXCPMessage::deserialize(reinterpret_cast<NXCP_MESSAGE*> (m_buffer)); msg = NXCPMessage::deserialize(reinterpret_cast<NXCP_MESSAGE*> (m_buffer));
if (msg == nullptr) if (msg == nullptr)
*protocolError = true; // message deserialization error *protocolError = true; // message deserialization error
} }
else else
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)