From: Marco van Wieringen Date: Tue, 7 Jul 2009 15:42:01 +0000 (+0200) Subject: Use bstrncpy instead of strncpy X-Git-Tag: Release-5.0.0~333^2~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1a413791d5b76233afeb1aaaf6bd1ef787ada2c3;p=bacula%2Fbacula Use bstrncpy instead of strncpy --- diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c index 4c52aa8106..5388196217 100644 --- a/bacula/src/filed/xattr.c +++ b/bacula/src/filed/xattr.c @@ -672,7 +672,7 @@ static void add_xattr_link_cache_entry(ino_t inum, char *target) ptr = (xattr_link_cache_entry_t *)malloc(sizeof(struct xattr_link_cache_entry)); memset((caddr_t)ptr, 0, sizeof(struct xattr_link_cache_entry)); ptr->inum = inum; - strncpy(ptr->target, target, sizeof(ptr->target)); + bstrncpy(ptr->target, target, sizeof(ptr->target)); xattr_link_cache->append(ptr); } @@ -1200,11 +1200,11 @@ static bsub_exit_code solaris_save_xattrs(JCR *jcr, const char *xattr_namespace, snprintf(current_xattr_namespace, sizeof(current_xattr_namespace), "%s%s/", xattr_namespace, attr_parent); } else { - strncpy(current_xattr_namespace, "/", sizeof(current_xattr_namespace)); + bstrncpy(current_xattr_namespace, "/", sizeof(current_xattr_namespace)); } } else { name = jcr->last_fname; - strncpy(current_xattr_namespace, "/", sizeof(current_xattr_namespace)); + bstrncpy(current_xattr_namespace, "/", sizeof(current_xattr_namespace)); } /*