From e6a848630da3ba958c442438ea131c99fa088605 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 22 Jul 2014 07:02:00 +0200 Subject: [PATCH] fix unstrcpy Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Bug: https://bugzilla.samba.org/show_bug.cgi?id=10735 CVE-2014-3560: unstrcpy macro length is invalid --- lib/util/string_wrappers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/string_wrappers.h b/lib/util/string_wrappers.h index 5f9d568..243fafc 100644 --- a/lib/util/string_wrappers.h +++ b/lib/util/string_wrappers.h @@ -51,7 +51,7 @@ do { \ #define unstrcpy(d,s) \ do { \ const char *_unstrcpy_src = (const char *)(s); \ - strlcpy((d),_unstrcpy_src ? _unstrcpy_src : "",sizeof(fstring)); \ + strlcpy((d),_unstrcpy_src ? _unstrcpy_src : "",sizeof(unstring)); \ } while (0) #ifdef HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS -- 1.9.1