Fix invalid read found by valgrind.
This commit is contained in:
parent
614f716726
commit
2881479cc2
|
@ -129,7 +129,7 @@ Loggable::escape ( const char *s )
|
||||||
{
|
{
|
||||||
static char r[512];
|
static char r[512];
|
||||||
|
|
||||||
for ( size_t i = 0; i < sizeof( r ); ++i, ++s )
|
for ( size_t i = 0; *s && i < sizeof( r ); ++i, ++s )
|
||||||
{
|
{
|
||||||
if ( '\n' == *s )
|
if ( '\n' == *s )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue