I'm sending a proposed patch to fix the buffer overrun problem in handling log messages. 

Dongsu Han