[PATCH] Fill a SECBUFFER_MISSING buffer if the message is not complete

Austin English austinenglish at gmail.com
Tue Sep 7 13:12:11 CDT 2010


On Tue, Sep 7, 2010 at 10:44 AM, Mikko Rasa <tdb at tdb.fi> wrote:
> ---
>  dlls/secur32/schannel.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)

Howdy Mikko,

> diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
> index 78757ac..192f9cb 100644
> --- a/dlls/secur32/schannel.c
> +++ b/dlls/secur32/schannel.c
> @@ -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

I can't comment on the rest of the patch, but please use C89 /*
comments */, not C99 (//).

-- 
-Austin



More information about the wine-devel mailing list