]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: log: don't try to emit a log if no logger is set
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Jan 2015 15:29:53 +0000 (16:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Jan 2015 15:29:53 +0000 (16:29 +0100)
commit8c97ab5eb2da447441932ad35b06dc94574140ad
tree844c68e796daf00b07ecd4b19860964fef79c51f
parent319f745ba053b67bb88f5a118ca06fecb5066be5
BUG/MAJOR: log: don't try to emit a log if no logger is set

send_log() calls update_hdr() to build a log header. It may happen
that no logger is defined at all but that we try to send a log anyway
(eg: upon startup). This results in a segfault when building the log
header because logline was never allocated.

This bug was revealed by the recent log-tag changes because the logline
is dereferenced after the call to snprintf(). So in 1.5 on most platforms
it has no impact because snprintf() will ignore NULL, but not necessarily
on all platforms.

The fix needs to be backported to 1.5.
src/log.c