]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
ptcomm: Fix damaged buffer found in buffer resize.
authorRadosław Korzeniewski <radekk@inteos.pl>
Tue, 22 Dec 2020 15:00:32 +0000 (16:00 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:59 +0000 (09:02 +0100)
bacula/src/plugins/fd/pluginlib/ptcomm.cpp

index 7e5f4ecd3a3d7c952ee9d3aea06059358eeed1e6..c400557615690c752e0075f954b847c17da29402 100644 (file)
@@ -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);
    }