From fb1d325d96dfe9bc2e9c4ec46ad4c55e8f18f4a2 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@samba.org>
Date: Tue, 22 Jul 2014 07:02:00 +0200
Subject: [PATCH] fix unstrcpy
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
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 files changed, 1 insertions(+), 1 deletions(-)
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.7.0.4