Martin Sebor wrote:
[...]
_rw_bufcat() is supposed to fail when the requested amount of memory
exceeds the maximum (Buffer::maxsize). When the format string starts
with the %{*} directive, maxsize is set to the value of the first
argument in the argument list. So some of the pieces necessary to
make this possible are in place, but not all of them. In addition,
the code that is there is buggy and needs to be fixed to make the
feature usable. The bottom line is that something like
rw_snprintf (buffer, size, "...", ...) should do what we want. Let
me look into it.

Here's a patch that lets us call rw_snprintf() to format a string
into a fixed-size buffer:
  http://svn.apache.org/viewvc?rev=422914&view=rev

It's not quite as "elegant" as it should be (or rather, it uses
a hack to get it to work) but it's better than nothing for now.

Martin

Reply via email to