Bug in talloc_asprintf_append()

Stefan (metze) Metzmacher metze at samba.org
Fri Sep 14 13:42:16 GMT 2007


Jeremy Allison schrieb:
> On Thu, Sep 13, 2007 at 09:40:28AM +0200, Stefan (metze) Metzmacher wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Jeremy Allison schrieb:
>>> Tridge,
>>>
>>> 	The talloc_asprintf_append() function doesn't take
>>> into account a truncated string.
>> Hi Jeremy,
>>
>> I think that's intentional, see:
>> http://viewcvs.samba.org/cgi-bin/viewcvs.cgi?rev=5937&view=rev
>>
>> but I think it should be persistent between all string related
>> talloc_*append* calls, talloc_append_string() was forgotten in
>> the optimization.
> 
> It wasn't talloc_append_string() that caused the problem,
> but the length calculation in talloc_asprintf_append().

I know, all I wanted to say was that the length calculation
should be the same in talloc_append_string() and talloc_asprintf_append().

I think we need talloc_*_append_end() functions which use
the optimisation, as this is the reason the RPC-ECHO timeouts
when the validate option is used.

This test needed 21 seconds before and is now killed by the timeout
code after 1200 seconds.

metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20070914/479fbb8e/signature.bin


More information about the samba-technical mailing list