might creep back into the code base as awareness of the issue fades.
Regards,
Jochen
- Original Message -
From: "Adam Tkac"
To: "Jochen Neubeck"
Cc:
Sent: Tuesday, May 03, 2011 1:29 PM
Subject: Re: [Tigervnc-devel] [PATCH] Help avoid improper use of LogWriter
I mobilized all my programming skills but I wasn't able to get rid of
warnings written below so I must reject this change.
In long term the only way seems to use C++ I/O operators in LogWriter
class which can safely deal with your example code.
I checked source code and it seems there aren't wron
Sorry for late response, this mail got lost in my queue.
You are right that current LogWriter implementation will have problems
with your example. However your patch causes following compilation warnings:
In file included from CConnection.cxx:28:0:
../../common/rfb/LogWriter.h: In member function
Consider the following example:
try {
static const char silly_example[] = "just a %silly% example";
char expanded[100];
if (!ExpandEnvironmentStrings(silly_example, expanded, sizeof expanded))
throw rdr::Exception("failed to expand %s", silly_example);
} catch (rdr::exception &e) {
vlo
On Sat, Dec 04, 2010 at 10:12:25AM +0100, Jochen Neubeck wrote:
> LogWriter output methods are at times called with just a single
> argument, which LogWriter always treats as an sprintf format string,
> but which is not always meant to be such. I have seen this in a few
> catch blocks which involve
LogWriter output methods are at times called with just a single argument,
which LogWriter always treats as an sprintf format string, but which is not
always meant to be such. I have seen this in a few catch blocks which
involve logging of the preformatted diagnostic messages provided by the
exc