]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
win32: fix win32 build strncpy->bstrncpy Release-9.6.4
authorKern Sibbald <kern@sibbald.com>
Tue, 9 Jun 2020 13:34:29 +0000 (15:34 +0200)
committerKern Sibbald <kern@sibbald.com>
Tue, 9 Jun 2020 13:34:29 +0000 (15:34 +0200)
bacula/src/win32/filed/plugins/bpipe-fd.c
bacula/src/win32/filed/plugins/exchange-fd.c

index 6e5ea8bea14d87a537b18bb5bf8352ca0d65cb50..9098e44d17f06eaea666817e5f11c16e13667262 100644 (file)
@@ -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;
index 001dd43ccd359ede2d049f0a00cef31f67630899..6404e1e62bdb078eb48127e5a75135c6abc1f2ce 100644 (file)
@@ -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;