Make logging use a fixed-length buffer to avoid race conditions.
authorEkdohibs <nathanael.courant@laposte.net>
Thu, 21 Apr 2016 08:45:42 +0000 (10:45 +0200)
committerparamat <mat.gregory@virginmedia.com>
Thu, 21 Apr 2016 09:15:17 +0000 (10:15 +0100)
commitc350cfb50b3bf81c075a80307adb15393ea773d0
tree141921a19662a79cc3943d730f87c413e6c9c6eb
parent5c32c5e945275c612c10021bbd2117a73a97fc3f
Make logging use a fixed-length buffer to avoid race conditions.

Previously, race conditions occurred inside logging, that caused
segfaults because a thread was trying to use an old pointer that
was freed when the string was reallocated. Using a fixed-length buffer
avoids this, at the cost of cutting too long messages over seveal lines.
src/log.cpp