bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts


From: Eli Zaretskii
Subject: bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts
Date: Sun, 10 Apr 2011 01:19:25 -0400

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Paul Eggert <eggert@cs.ucla.edu>,  8435@debbugs.gnu.org
> Date: Sun, 10 Apr 2011 00:52:09 -0300
> 
> If the problematic case can be detected easily, that's good enough.

What would you suggest to do if we detect it?  To recap, this is in
the context of `message' or `error' called to produce a message about
something.

> I don't understand the problem enough (haven't dug into it yet) to know
> if that's the case.

There are two issues:

 . %c used to display a non-ASCII character, when the data points to a
   multibyte sequence.  doprnt converts the data to a wide character,
   when it displays the message, vsnprintf does not.

 . If the buffer supplied to doprnt is too small, it takes care to
   truncate the text only on character boundaries, whereas vsnprintf
   will not.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]