From: Kern Sibbald Date: Thu, 2 May 2019 13:51:27 +0000 (+0200) Subject: Fix Window bpipe-fd programming error X-Git-Tag: Release-9.4.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a51221ffa17f22ad1f8433eb70415b2f3589e6ef;p=thirdparty%2Fbacula.git Fix Window bpipe-fd programming error --- diff --git a/bacula/src/win32/filed/plugins/bpipe-fd.c b/bacula/src/win32/filed/plugins/bpipe-fd.c index 7b7e66021..7e86adb60 100644 --- a/bacula/src/win32/filed/plugins/bpipe-fd.c +++ b/bacula/src/win32/filed/plugins/bpipe-fd.c @@ -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; diff --git a/bacula/src/win32/lib/bacula32.def b/bacula/src/win32/lib/bacula32.def index af2ce8c44..6472c924d 100644 --- a/bacula/src/win32/lib/bacula32.def +++ b/bacula/src/win32/lib/bacula32.def @@ -928,6 +928,7 @@ _Z9SHA1FinalP11SHA1ContextPh _Z10sm_reallocPKciPvj _Z12actuallyfreePv _Z12sm_check_rtnPKcib +_Z12sm_get_ownerxPc _Z12sm_new_ownerPKciPc _Z14actuallycallocjj _Z14actuallymallocj