talloc_asprintf dumping the length?

David Collier-Brown davec-b at rogers.com
Sun Aug 13 23:32:20 GMT 2006


Righto, thanks!

--dave

Andrew Bartlett wrote:
> On Sun, 2006-08-13 at 22:57 +0000, David Collier-Brown wrote:
> 
>>cat >x.c <<!
>>#include <stdio.h>
>>main() {
>>         printf("%s\n", NULL);
>>}
>>!
>>froggy> cc x.c
>>"x.c", line 2: warning: old-style declaration or incorrect type for: main
>>froggy> ./a.out
>>Segmentation Fault
>>froggy>
>>
>>I'm not entirely sure that's safe (:-))
> 
> 
> Our configure tests are meant to detect that (if they don't, it's a bug)
> and replace the printf() in that case.  (Actually, I think it only
> replaces snprintf() and asprintf(), but they are the main ones we
> actually use).
> 
> Andrew Bartlett
> 

-- 
David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net           |                      -- Mark Twain
(416) 223-5943


More information about the samba-technical mailing list