From: Radosław Korzeniewski Date: Tue, 22 Dec 2020 15:00:32 +0000 (+0100) Subject: ptcomm: Fix damaged buffer found in buffer resize. X-Git-Tag: Release-11.3.2~738 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a47ec68acc071b5e30b92778a1bd00380860f107;p=thirdparty%2Fbacula.git ptcomm: Fix damaged buffer found in buffer resize. --- diff --git a/bacula/src/plugins/fd/pluginlib/ptcomm.cpp b/bacula/src/plugins/fd/pluginlib/ptcomm.cpp index 7e5f4ecd3..c40055761 100644 --- a/bacula/src/plugins/fd/pluginlib/ptcomm.cpp +++ b/bacula/src/plugins/fd/pluginlib/ptcomm.cpp @@ -478,7 +478,7 @@ int32_t PTCOMM::recvbackend(bpContext *ctx, char cmd, POOL_MEM &buf) if (length > 0) { // check requested buffer size - buf.check_size(length); + buf.check_size(length + 1); return handle_payload(ctx, buf.c_str(), length); }