[PATCH 2/5] rpcrt4: Set CorrDespIncrement to the size of the (non-range) /robust payload.

Dmitry Timoshkov dmitry at baikal.ru
Mon Jul 13 06:59:53 CDT 2015


Huw Davies <huw at codeweavers.com> wrote:

> +static void test_NdrCorrelationInitialize(void)
> +{
> +    MIDL_STUB_MESSAGE stub_msg;
> +    BYTE buf[256];
> +
> +    memset( &stub_msg, 0, sizeof(stub_msg) );
> +    memset( buf, 0, sizeof(buf) );
> +
> +    NdrCorrelationInitialize( &stub_msg, buf, sizeof(buf), 0 );
> +    ok( stub_msg.CorrDespIncrement == 2 ||
> +        broken(stub_msg.CorrDespIncrement == 0), /* <= Win 2003 */
> +        "got %d\n", stub_msg.CorrDespIncrement );
> +
> +    stub_msg.CorrDespIncrement = 1;
> +    NdrCorrelationInitialize( &stub_msg, buf, sizeof(buf), 0 );
> +    ok( stub_msg.CorrDespIncrement == 1, "got %d\n", stub_msg.CorrDespIncrement );
> +}

Probably having memset() calls before both tests would make it more
convincing.

-- 
Dmitry.



More information about the wine-devel mailing list