From 619a99bf997984fa067a33551a86b1ea8282bd15 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 31 Jul 2017 12:35:48 +0200 Subject: [PATCH] rsrv: missing send lock around send_err() --- src/rsrv/camessage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rsrv/camessage.c b/src/rsrv/camessage.c index 160bc2138..44346ec77 100644 --- a/src/rsrv/camessage.c +++ b/src/rsrv/camessage.c @@ -2528,8 +2528,10 @@ int camessage ( struct client *client ) * aligned payloads */ if ( msgsize & 0x7 ) { + SEND_LOCK(client); send_err ( &msg, ECA_INTERNAL, client, "CAS: Missaligned protocol rejected" ); + SEND_UNLOCK(client); log_header ( "CAS: Missaligned protocol rejected", client, &msg, 0, nmsg ); status = RSRV_ERROR; @@ -2545,9 +2547,11 @@ int camessage ( struct client *client ) if ( msgsize > client->recv.maxstk ) { casExpandRecvBuffer ( client, msgsize ); if ( msgsize > client->recv.maxstk ) { + SEND_LOCK(client); send_err ( &msg, ECA_TOLARGE, client, "CAS: Server unable to load large request message. Max bytes=%lu", rsrvSizeofLargeBufTCP ); + SEND_UNLOCK(client); log_header ( "CAS: server unable to load large request message", client, &msg, 0, nmsg ); assert ( client->recv.cnt <= client->recv.maxstk );