fixing long log message crash by initializing buffer properly.