diff options
author | Tad Marshall <tad@10gen.com> | 2012-09-21 13:55:18 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-09-21 15:58:56 -0400 |
commit | 6df07abe328e69666b4ae732d8e38b5880a989bf (patch) | |
tree | 036c90a75e7f3a04610d0bca5ee23ae7e662ad17 /src/mongo/util/log.cpp | |
parent | b54e14f8f6f14d1183e5d2a157853b98efedf736 (diff) | |
download | mongo-6df07abe328e69666b4ae732d8e38b5880a989bf.tar.gz |
SERVER-7036 do not insert NULs in abbreviated long logged lines
Pass 'false' for includeEndingNull in two calls to BufBuilder::appendStr
to we don't insert null terminators in the middle of an output buffer.
Diffstat (limited to 'src/mongo/util/log.cpp')
-rw-r--r-- | src/mongo/util/log.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp index 20f5e9fba51..980bb6a5490 100644 --- a/src/mongo/util/log.cpp +++ b/src/mongo/util/log.cpp @@ -336,10 +336,10 @@ namespace mongo { stringstream sss; sss << "warning: log line attempted (" << msg.size() / 1024 << "k) over max size(" << MAX_LOG_LINE / 1024 << "k)"; sss << ", printing beginning and end ... "; - b.appendStr( sss.str() ); + b.appendStr( sss.str(), false ); const char * xx = msg.c_str(); b.appendBuf( xx , MAX_LOG_LINE / 3 ); - b.appendStr( " .......... " ); + b.appendStr( " .......... ", false ); b.appendStr( xx + msg.size() - ( MAX_LOG_LINE / 3 ) ); } else { |