summaryrefslogtreecommitdiff
path: root/src/libelogind/sd-bus/bus-message.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-07-07 06:30:34 +0200
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:13:01 +0200
commit93b089be778452f2c34c468666b1f5646d64d331 (patch)
treee18f22a2d5101a172c5275db56214902c108f7f8 /src/libelogind/sd-bus/bus-message.c
parenteeeff96fedd10487ca12e246832475090b245d36 (diff)
basic: log: Increase static buffer for source file location (#3674)
Commit d054f0a4 ("tree-wide: use xsprintf() where applicable") used a semantic patch approach to change a number of locations from snprintf(buf, sizeof(buf), FMT, ...) to xsprintf(buf, FMT, ...) The problem is that xsprintf() wraps the snprintf() in an assert_message_se(), so if snprintf() reports an overflow of the destination buffer, the binary will now terminate. This hit a user running a version of elogind that was built from a deeply nested system path. Fix this by a) Switching back to snprintf() for this particular case. We should really rather truncate the location string than crash in such situations. b) Increasing the size of that static string buffer, to make the event more unlikely.
Diffstat (limited to 'src/libelogind/sd-bus/bus-message.c')
0 files changed, 0 insertions, 0 deletions