[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9412: sprintf-related integer and memory overflow issues
From: |
Chong Yidong |
Subject: |
bug#9412: sprintf-related integer and memory overflow issues |
Date: |
Tue, 30 Aug 2011 22:08:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Paul Eggert <eggert@cs.ucla.edu> 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.