BUG in enumprinterdataex

Martin Zielinski mz at seh.de
Mon Feb 5 09:24:20 GMT 2007


Hallo!

Confirmed that this patch works with XP and Vista.

The problem with not aligned buffers is present on XP and also on Vista.

Thanks,
Martin

Jeremy Allison schrieb:
> On Sat, Feb 03, 2007 at 09:28:43AM +0100, Martin wrote:
>> Hi!
>> I certainly trapped vista again.
>> The proposed fix works with XP but not with Vista.
>> Easy to compare: Samba returns a buffer size of 1642 bytes.
>> -> XP offers a buffer of 1644 bytes.
>> -> Vista 1642 bytes.
>>
>> If we only align the buffer size (as in the proposed patch), we earn a 
>> 1783 error. It seems that the buffer size in the RPC *must* match the 
>> "needed" size in the message itself.
>>
>> So the better fix would be to align the "needed" var before the test
>> against the input size.
> 
> So you're saying round up needed to a 4 byte boundary before
> setting it in r_u->needed ?
> 
> I've attached a proposed fix - can you test it for me
> before Monday (I don't have my Vista test env set up
> at home yet).
> 
> Jeremy.

-- 
Martin Zielinski             mz at seh.de
Software Development
SEH Computertechnik GmbH     www.seh.de



More information about the samba-technical mailing list