From c22df13d9548ac99ed7a50f462227523ee15d8ed Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Thu, 11 Jul 2019 18:51:03 +0320 Subject: Dirty fix libgcrypt memleak --- src/omemo/crypto.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/omemo/crypto.c b/src/omemo/crypto.c index 81d7c922..5a67c3b1 100644 --- a/src/omemo/crypto.c +++ b/src/omemo/crypto.c @@ -55,6 +55,11 @@ omemo_crypto_init(void) gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); + /* Ask for a first random buffer to ensure CSPRNG is initialized. + * Thus we control the memleak produced by gcrypt initialization and we can + * suppress it without having false negatives */ + gcry_free(gcry_random_bytes_secure(1, GCRY_VERY_STRONG_RANDOM)); + return 0; } -- cgit 1.4.1-2-gfad0 commit Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log tree commit diff stats
path: root/subx/build
blob: 1979d6238ae29bb39e8ed9fc3eac5d99caf7a158 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109