From: Kern Sibbald Date: Thu, 2 May 2019 13:58:20 +0000 (+0200) Subject: Fix bad Windows strncpy again ... X-Git-Tag: Release-11.3.2~1503 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfb51c59a5c5cf9f06d198ded4fa8ff4f80ed2db;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 6e5ea8bea1..5e6eca38d6 100644 --- a/bacula/src/win32/filed/plugins/bpipe-fd.c +++ b/bacula/src/win32/filed/plugins/bpipe-fd.c @@ -448,8 +448,7 @@ static bRC createFile(bpContext *ctx, struct restore_pkt *rp) 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)); + bstrncpy(((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;