From: Kern Sibbald Date: Thu, 2 May 2019 13:58:20 +0000 (+0200) Subject: Fix bad Windows strncpy again ... X-Git-Tag: Release-9.4.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21a9728c16840c9628cbce93f543e7c5d0702ce2;p=thirdparty%2Fbacula.git Fix bad Windows strncpy again ... --- diff --git a/bacula/src/win32/filed/plugins/bpipe-fd.c b/bacula/src/win32/filed/plugins/bpipe-fd.c index 7e86adb60..6e5ea8bea 100644 --- a/bacula/src/win32/filed/plugins/bpipe-fd.c +++ b/bacula/src/win32/filed/plugins/bpipe-fd.c @@ -443,10 +443,10 @@ static bRC endRestoreFile(bpContext *ctx) */ static bRC createFile(bpContext *ctx, struct restore_pkt *rp) { -// printf("bpipe-fd: createFile\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)); + /* Note: this really should fail Bacula!!! */ + printf("Restore where directory name too long. Restricting to first %d bytes.\n", + (int)sizeof(plugin_ctx::where)-1); } strncpy(((struct plugin_ctx *)ctx->pContext)->where, rp->where, sizeof(plugin_ctx::where));