From: Kern Sibbald Date: Tue, 9 Jun 2020 13:34:29 +0000 (+0200) Subject: win32: fix win32 build strncpy->bstrncpy X-Git-Tag: Release-9.6.4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1205b4300e14e246bc3eae897bbdd8c9e939f250;p=thirdparty%2Fbacula.git win32: fix win32 build strncpy->bstrncpy --- diff --git a/bacula/src/win32/filed/plugins/bpipe-fd.c b/bacula/src/win32/filed/plugins/bpipe-fd.c index 6e5ea8bea..9098e44d1 100644 --- a/bacula/src/win32/filed/plugins/bpipe-fd.c +++ b/bacula/src/win32/filed/plugins/bpipe-fd.c @@ -1,7 +1,7 @@ /* Bacula(R) - The Network Backup Solution - Copyright (C) 2000-2018 Kern Sibbald + Copyright (C) 2000-2020 Kern Sibbald The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -448,7 +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, + 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; diff --git a/bacula/src/win32/filed/plugins/exchange-fd.c b/bacula/src/win32/filed/plugins/exchange-fd.c index 001dd43cc..6404e1e62 100644 --- a/bacula/src/win32/filed/plugins/exchange-fd.c +++ b/bacula/src/win32/filed/plugins/exchange-fd.c @@ -1,7 +1,7 @@ /* Bacula(R) - The Network Backup Solution - Copyright (C) 2000-2018 Kern Sibbald + Copyright (C) 2000-2020 Kern Sibbald The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -23,6 +23,7 @@ */ #include "exchange-fd.h" +#undef strncpy /* Pointers to Bacula functions */ bFuncs *bfuncs = NULL;