[Developers] [CactusMaint] Cactus/2058: Util_snprintf() fails for format string "distance=%d threshold=%g %s"

Jonathan Thornburg jthorn at aei.mpg.de
Thu Sep 28 07:59:38 CDT 2006


Hi,

Just to refresh everyone's memory, this bug (#2058) reports that Cactus's
Util_snprintf() writes incorrect (garbled) characters to the string
buffer for the test format string "distance=%d threshold=%g %s" (with
arguments 3, 0.0, and "order=2" respectively).  The bug report includes
a test thorn which demonstrates the problem.

I suggested that rather than trying to patch Cactus's Util_snprintf(),
we replace it with an existing one from some other license-compatible
free software project.  At the moment Apache1's  src/ap/ap_snprintf.c
looks like the best candidate -- it's a pretty standard BSD license,
	[unlike Apache2, which has a whole load of new
	legalese in their license terms]
requiring only a credit in the Cactus documentation, and the code itself
looks decently self-contained.

IMHO fixing this bug should be a fairly high priority -- certainly it
should be fixed before another beta release -- because it has the potential
to cause memory corruption.  However, it's clear I won't have the time
to do this any time in the next month.  Could someone else take over
getting a fix for this into CVS?

thanks, ciao,

-- 
-- Jonathan Thornburg <jthorn at aei.mpg.de>      
   Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
   Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html      
   "Washing one's hands of the conflict between the powerful and the
    powerless means to side with the powerful, not to be neutral."
                                      -- quote by Freire / poster by Oxfam



More information about the Developers mailing list