From 7f8e0f3352ca2a16a00d30c0e9762c534233d2a2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 14 Apr 2016 15:59:17 +0200 Subject: [PATCH] Tweak bsock msglen of zero loop --- bacula/src/lib/bsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index ced11125ab..5cb5d63da4 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -483,7 +483,7 @@ bool BSOCK::fsend(const char *fmt, ...) va_start(arg_ptr, fmt); msglen = bvsnprintf(msg, maxlen, fmt, arg_ptr); va_end(arg_ptr); - if (msglen > 0 && msglen < (maxlen - 5)) { + if (msglen >= 0 && msglen < (maxlen - 5)) { break; } msg = realloc_pool_memory(msg, maxlen + maxlen / 2); -- 2.39.5