You have the wrong list; this is bug-coreutils which deals with the
coreutils package.  If you suspect you have a glibc bug, there is a list
called bug-glibc.  

Now that that is out of the way, here's an answer:  

It is not a bug, but %n is causing vsprintf to expect an argument where
you have passed none.  

What you have written looks to me like the equivalent of: 
printf ("%n"); 
which of course won't work because you haven't passed another parameter.
See the man page for vsprintf: %n is special, and requires an int
pointer as a paramter. 

If you want any string to work with your function, try calling it like
this: 
Dump("%s", "Will cause segment fault -- %n");

That, or double up your percent signs if you want a literal percent
sign: 
Dump("Will cause segment fault -- %%n");

--James 



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Kalle Skott
Sent: Thursday, April 27, 2006 7:41 AM
To: bug-coreutils@gnu.org
Subject: vsnprintf - segement fault


This small code snippet will cause a segment fault in:
...


***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.
****************************************************************************


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to