Skip to content

Commit

Permalink
camessage.c: Add missing condition to detect extended message form,
Browse files Browse the repository at this point in the history
beside the payload field (m_postsize) being set to 0xffff, the data
count field (m_count) must also be set to 0
  • Loading branch information
jesusvasquez333 committed Mar 11, 2021
1 parent c8105a1 commit 5db7541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/database/src/ioc/rsrv/camessage.c
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ int camessage ( struct client *client )
*
* Disconnect client that send an invalid payload size.
*/
if ( CA_V49(client->minor_version_number) && msg.m_postsize == 0xffff ) {
if (CA_V49(client->minor_version_number) && msg.m_postsize == 0xffff && msg.m_count == 0) {
ca_uint32_t *pLW = ( ca_uint32_t * ) ( mp + 1 );
if ( bytes_left < sizeof(*mp) + 2 * sizeof(*pLW) ) {
status = RSRV_OK;
Expand Down

0 comments on commit 5db7541

Please sign in to comment.