diff --git a/samba-4.1.1-Fix-memset-in-ntdb.patch b/samba-4.1.1-Fix-memset-in-ntdb.patch new file mode 100644 index 0000000..85362d1 --- /dev/null +++ b/samba-4.1.1-Fix-memset-in-ntdb.patch @@ -0,0 +1,38 @@ +commit 45a1cbb7514f9db5fe2d7c2207d7723092aa164d +Author: Volker Lendecke +AuthorDate: Thu Jul 11 14:57:53 2013 +0200 +Commit: Karolin Seeger +CommitDate: Mon Oct 14 10:11:48 2013 +0200 + + ccan: Fix calling memset with zero length parameter + + Signed-off-by: Volker Lendecke + Reviewed-by: Andreas Schneider + + Autobuild-User(master): Andreas Schneider + Autobuild-Date(master): Thu Jul 11 16:55:49 CEST 2013 on sn-devel-104 + + Signed-off-by: Andreas Schneider + + Fix bug #10190 - Fix memset used with constant zero length parameter. +--- + lib/ccan/tally/tally.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c +index 774373c..29f0555 100644 +--- a/lib/ccan/tally/tally.c ++++ b/lib/ccan/tally/tally.c +@@ -506,11 +506,11 @@ char *tally_histogram(const struct tally *tally, + + if (count > covered) { + count -= covered; ++ memset(p, '*', count); + } else { + count = 0; + } + +- memset(p, '*', count); + p += count; + *p = '\n'; + p++; diff --git a/samba.spec b/samba.spec index ff2d253..7208b11 100644 --- a/samba.spec +++ b/samba.spec @@ -1,7 +1,7 @@ # Set --with testsuite or %bcond_without to run the Samba torture testsuite. %bcond_with testsuite -%define main_release 3 +%define main_release 4 %define samba_version 4.1.0 %define talloc_version 2.0.8 @@ -85,6 +85,8 @@ Source6: samba.pamd Source200: README.dc Source201: README.downgrade +Patch0: samba-4.1.1-Fix-memset-in-ntdb.patch + BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires(pre): /usr/sbin/groupadd @@ -476,6 +478,8 @@ module necessary to communicate to the Winbind Daemon %prep %setup -q -n samba-%{version}%{pre_release} +%patch0 -p1 -b .samba-4.1.1-Fix-memset-in-ntdb.patch + %build %global _talloc_lib ,talloc,pytalloc,pytalloc-util %global _tevent_lib ,tevent,pytevent @@ -1529,6 +1533,7 @@ rm -rf %{buildroot} * Wed Oct 30 2013 - Andreas Schneider - 4.1.0-4 - related: #884169 - Add direct dependency to samba-libs in the glusterfs package. +- related: #884169 - Fix memset call with zero length in in ntdb. * Fri Oct 18 2013 - Andreas Schneider - 4.1.0-3 - resolves: #1020329 - Build glusterfs VFS plguin.