diff options
Diffstat (limited to 'src/protosetup.c')
-rw-r--r-- | src/protosetup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/protosetup.c b/src/protosetup.c index ad9ba88..bdc00c8 100644 --- a/src/protosetup.c +++ b/src/protosetup.c @@ -150,6 +150,17 @@ IceProtocolSetup ( SIZEOF (iceProtocolSetupMsg), WORD64COUNT (extra), iceProtocolSetupMsg, pMsg, pData); + if (pData == NULL) { + iceConn->outbufptr -= SIZEOF (iceProtocolSetupMsg); + free(authIndices); + if (errorStringRet && errorLength > 0) { + strncpy (errorStringRet, + "Too much extra data for iceProtocolSetupMsg", errorLength); + errorStringRet[errorLength - 1] = '\0'; + } + return (IceProtocolSetupFailure); + } + setup_sequence = iceConn->send_sequence; pMsg->protocolOpcode = myOpcode; |