mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-03 18:37:24 +08:00
#4792 Calculated log message size rather than using fixed size
This commit is contained in:
@@ -230,11 +230,7 @@ ProtocolUtil::vreadf(synergy::IStream* stream, const char* fmt, va_list args)
|
||||
throw;
|
||||
}
|
||||
|
||||
// don't cause buffer overrun, using +100 chars in case
|
||||
// someone modifies this log message in future.
|
||||
if (len + 100 < kLogMessageLength) {
|
||||
LOG((CLOG_DEBUG2 "readf: read %d byte string: %.*s", len, len, sBuffer));
|
||||
}
|
||||
LOG((CLOG_DEBUG2 "readf: read %d byte string: %.*s", len, len, sBuffer));
|
||||
|
||||
// save the data
|
||||
String* dst = va_arg(args, String*);
|
||||
|
||||
Reference in New Issue
Block a user