secur32: Fill a SECBUFFER_MISSING buffer if the message is not complete.
This commit is contained in:
parent
b335e94788
commit
506af9205d
|
@ -1244,6 +1244,15 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
|
|||
if(buffer->cbBuffer < expected_size)
|
||||
{
|
||||
TRACE("Expected %u bytes, but buffer only contains %u bytes\n", expected_size, buffer->cbBuffer);
|
||||
buffer->BufferType = SECBUFFER_MISSING;
|
||||
buffer->cbBuffer = expected_size - buffer->cbBuffer;
|
||||
|
||||
/* This is a bit weird, but windows does it too */
|
||||
idx = schan_find_sec_buffer_idx(message, 0, SECBUFFER_EMPTY);
|
||||
buffer = &message->pBuffers[idx];
|
||||
buffer->BufferType = SECBUFFER_MISSING;
|
||||
buffer->cbBuffer = expected_size - buffer->cbBuffer;
|
||||
|
||||
TRACE("Returning SEC_E_INCOMPLETE_MESSAGE\n");
|
||||
return SEC_E_INCOMPLETE_MESSAGE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue