]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/samba/samba-3.6.99-fix_mangling_hash_segfault.patch
gcc: Fix building with glibc >= 2.28
[people/pmueller/ipfire-2.x.git] / src / patches / samba / samba-3.6.99-fix_mangling_hash_segfault.patch
CommitLineData
1d13e637
AF
1From 9f974a391260e95340f08091fdbc822845eae160 Mon Sep 17 00:00:00 2001
2From: Volker Lendecke <vl@samba.org>
3Date: Tue, 19 Aug 2014 14:32:15 +0000
4Subject: [PATCH] PATCHSET29: smbd: Properly initialize mangle_hash
5
6[Bug 10782] mangle_hash() can fail to initialize charset (smbd crash).
7
8https://bugzilla.samba.org/show_bug.cgi?id=10782
9
10Signed-off-by: Volker Lendecke <vl@samba.org>
11Reviewed-by: Jeremy Allison <jra@samba.org>
12
13Autobuild-User(master): Jeremy Allison <jra@samba.org>
14Autobuild-Date(master): Tue Aug 26 01:30:38 CEST 2014 on sn-devel-104
15
16(cherry picked from commit e914c2c52db7ecf3bb2a3860820c5cfe8812696e)
17---
18 source3/smbd/mangle_hash.c | 4 ++++
19 1 file changed, 4 insertions(+)
20
21diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
22index bafcd03..35a098f 100644
23--- a/source3/smbd/mangle_hash.c
24+++ b/source3/smbd/mangle_hash.c
25@@ -706,6 +706,10 @@ const struct mangle_fns *mangle_hash_init(void)
26 {
27 mangle_reset();
28
29+ if (chartest == NULL) {
30+ init_chartest();
31+ }
32+
33 /* Create the in-memory tdb using our custom hash function. */
34 tdb_mangled_cache = tdb_open_ex("mangled_cache", 1031, TDB_INTERNAL,
35 (O_RDWR|O_CREAT), 0644, NULL, fast_string_hash);
36--
372.5.0
38