On Thu, Jun 11, 2009 at 07:27:25PM -0400, Chet Ramey wrote:
> Robert Millan wrote:
> 
> > This is troublesome.  Imagine you have a large application whose behaviour
> > relies on a specific behaviour of xmalloc.  It is out of the question to
> > change how this xmalloc will work.
> > 
> > Now imagine you want to use libreadline in this program, and it turns out
> > your xmalloc breaks it completely.
> > 
> > Is there any reasonable solution to this?
> 
> This hasn't been a problem to date.  As a practical matter, I think the
> xmalloc/xrealloc interfaces appear in enough Gnu software to have well-
> known interfaces.

Right, but what about non-gnu software.  xmalloc.c in OpenSSH provides an
xmalloc() which fails when requested a zero-size block.

It's really not a good idea to change this behaviour when the whole program
has been written to rely on it, specially for such a security-sensible one.

And I can already tell what they'll reply if I request that they review
all their code so xmalloc behaviour can be changed to match better with
gnu conventions so that users can link libreadline with it.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."


_______________________________________________
Bug-readline mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to