]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix Window bpipe-fd programming error
authorKern Sibbald <kern@sibbald.com>
Thu, 2 May 2019 13:51:27 +0000 (15:51 +0200)
committerKern Sibbald <kern@sibbald.com>
Thu, 2 May 2019 13:51:27 +0000 (15:51 +0200)
bacula/src/win32/filed/plugins/bpipe-fd.c
bacula/src/win32/lib/bacula32.def

index 7b7e660217e1fe034a0bbb290fe55bc04d122587..7e86adb60b6863164986217ddb653a088ed02cad 100644 (file)
@@ -444,10 +444,12 @@ static bRC endRestoreFile(bpContext *ctx)
 static bRC createFile(bpContext *ctx, struct restore_pkt *rp)
 {
 // printf("bpipe-fd: createFile\n");
-   if (strlen(rp->where) > 512) {
-      printf("Restore target dir too long. Restricting to first 512 bytes.\n");
+   if (strlen(rp->where) >= sizeof(plugin_ctx::where)) {
+      printf("Restore target dir too long. Restricting to first %d bytes.\n",
+         sizeof(plugin_ctx::where));
    }
-   strncpy(((struct plugin_ctx *)ctx->pContext)->where, rp->where, 513);
+   strncpy(((struct plugin_ctx *)ctx->pContext)->where, rp->where,
+      sizeof(plugin_ctx::where));
    ((struct plugin_ctx *)ctx->pContext)->replace = rp->replace;
    rp->create_status = CF_EXTRACT;
    return bRC_OK;
index af2ce8c4416d5179bb0c0604dc1868758aef1d90..6472c924d2ecc47cec312cc665cc1304aea5ee11 100644 (file)
@@ -928,6 +928,7 @@ _Z9SHA1FinalP11SHA1ContextPh
 _Z10sm_reallocPKciPvj
 _Z12actuallyfreePv
 _Z12sm_check_rtnPKcib
+_Z12sm_get_ownerxPc
 _Z12sm_new_ownerPKciPc
 _Z14actuallycallocjj
 _Z14actuallymallocj