From 54f98aff78761318a4c95e3f27f73e403da24ead Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 13 Aug 2020 06:40:39 +0100 Subject: [PATCH] sspc: make it clear we can only get RPAR_STREAMTYPE in WAIT_INITIAL_TX state Otherwise Coverity will complain we only set up ssi in WAIT_INITIAL_TX --- lib/secure-streams/secure-streams-serialize.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/secure-streams/secure-streams-serialize.c b/lib/secure-streams/secure-streams-serialize.c index 94109fa01..a14b2b7e3 100644 --- a/lib/secure-streams/secure-streams-serialize.c +++ b/lib/secure-streams/secure-streams-serialize.c @@ -841,6 +841,15 @@ payload_ff: if (par->ctr == sizeof(par->streamtype) - 1) goto hangup; + /* + * We can only expect to get this if we ourselves are + * in the state that we're waiting for it. If it comes + * later it's a protocol error. + */ + + if (*state != LPCSPROX_WAIT_INITIAL_TX) + goto hangup; + /* * We're the proxy, creating an SS on behalf of a * client