Subject: Re: bug#9412: sprintf-related integer and memory overflow issues

From: Chong Yidong <[email-masked]>
Date: Tue, 30 Aug 2011 22:08:13 -0400

Paul Eggert <[email-masked]> writes:

> Here's a patch to the Emacs trunk to fix some sprintf-related integer
> and memory overflow issues in Emacs proper.  These bugs can cause the
> wrong integer to be displayed, or a buffer overrun in sprintf output,
> that sort of thing.  Almost all the bugs can occur independently of
> whether --with-wide-int is used.  The bugs range from unlikely to
> extremely unlikely in normal use (otherwise they would have been fixed
> already....).  The patch is (I hope) routine.  I plan to install this
> patch after some more internal testing.

I don't much like the idea of using custom functions like esprintf and
esnprintf.  They make the code much less clear.

Also, I seem to recall that the reason we don't use snprintf is that
it's not available on all the platforms that Emacs supports.