xserver-multidpi/os
Daniel Kurtz c91d00e0f3 os/log: refactor logging
It is not safe to ever use an arbitrary (possibly user supplied) string as
part of the format for a *sprintf() call.

For example:
  1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n"
  2. Pair it with a computer running X and try to use it
  3. X is not happy when trying to do the following in xf86-input-evdev:
     xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device);
     because LogVHdrMessageVerb() has put the %n from the device name
     into a format string of the form:
        "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n"

Instead, build up a log message in place by appending successive formatted
strings by sncprintf'ing to the end of the previous.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-03 14:59:23 +10:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
access.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
auth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
backtrace.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
client.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
connection.c os: Add -displayfd option 2012-05-01 11:36:30 +10:00
io.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
log.c os/log: refactor logging 2012-05-03 14:59:23 +10:00
Makefile.am Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
mitauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
oscolor.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
osdep.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
osinit.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
rpcauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strcasecmp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strcasestr.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcat.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcpy.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strndup.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
utils.c os: Add -displayfd option 2012-05-01 11:36:30 +10:00
WaitFor.c os: make timers signal-safe 2012-05-01 11:36:35 +10:00
xdmauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xdmcp.c Change lastDeviceIdleTime to be per-device 2012-03-22 13:12:56 +10:00
xprintf.c os/xprintf: add Xvscnprintf and Xscnprintf 2012-05-03 14:59:23 +10:00
xsha1.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xstrans.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00