log: fix history buffer overflow
authorDongsu Han <dongsuh@cs.cmu.edu>
Thu, 2 May 2013 09:22:37 +0000 (09:22 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 13:01:57 +0000 (15:01 +0200)
commit94bc87febf5a6640fb8e96c5d49084f1cebb42ef
tree585a18339424fbf030fe5545377ff095f1e581da
parent30a37273c1924a25df41f94e4b1f5f84cc2344a5
log: fix history buffer overflow

The '\0' is written outside the bounds of the log buffer, which can
result in memory corruption or display issues with log messages.

Use a new constant LOG_BUF_SIZE to store the effective size of the
buffer in struct log_history.

Signed-off-by: Dongsu Han <dongsuh@cs.cmu.edu>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_eal/common/eal_common_log.c