BUG in enumprinterdataex

Guenther Deschner gd at samba.org
Fri Feb 2 15:46:24 GMT 2007


On Friday 02 February 2007 10:34, Martin Zielinski wrote:
> Hello,
>
> i can observe the following situation on XP SP2 vs. Samba 3.0.23d:
>
> 1) XP does an EnumPrinterDataEx call with 0 bytes provided to Samba
> 2) Samba counts the space needed and returns a *not 4-byte aligned*
> amount of space (I can see it on the wire - e.g. 1642)
> 3) XP returns a 4-byte aligned value in the EnumPrinterDataEx - call.
> In the above case: 1644
> 4) The routine allocates 1644 bytes, does the call again and receives a
> 	RPC_X_BAD_STUB_DATA (0x6f7 = 1783) error.
>    Weird thing while debugging: I see the provided key name corrupted.
>
> The reason for this seems to be the returned buffer size in the RPC
> response.
> The attached diff fixes this for the enumprinterdataex call.
>
> Bye,
>
> Martin
>
> P.S. I'm really not shure - but haven't we had this one before?

Sounds a bit like 
https://bugzilla.samba.org/show_bug.cgi?id=1851, yes.

Guenther

-- 
Günther Deschner                    GPG-ID: 8EE11688
Novell / SUSE Labs                        gd at suse.de
Samba Team                              gd at samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070202/d8ceb4d1/attachment.bin


More information about the samba-technical mailing list