Magellan Linux

Contents of /trunk/systemd/patches/systemd-242-util-lib-fix-a-typo-in-rdrand.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3368 - (show annotations) (download)
Tue Jul 9 11:20:22 2019 UTC (4 years, 9 months ago) by niro
File size: 1510 byte(s)
-added systemd-242 upstream patches
1 From 7f2cdceaed4d37c4e601e531c7d863fca1bd1460 Mon Sep 17 00:00:00 2001
2 From: Evgeny Vereshchagin <evvers@ya.ru>
3 Date: Wed, 8 May 2019 15:50:53 +0200
4 Subject: [PATCH] util-lib: fix a typo in rdrand
5
6 Otherwise, the fuzzers will fail to compile with MSan:
7 ```
8 ../../src/systemd/src/basic/random-util.c:64:40: error: use of undeclared identifier 'sucess'; did you mean 'success'?
9 msan_unpoison(&success, sizeof(sucess));
10 ^~~~~~
11 success
12 ../../src/systemd/src/basic/alloc-util.h:169:50: note: expanded from macro 'msan_unpoison'
13 ^
14 ../../src/systemd/src/basic/random-util.c:38:17: note: 'success' declared here
15 uint8_t success;
16 ^
17 1 error generated.
18 [80/545] Compiling C object 'src/basic/a6ba3eb@@basic@sta/process-util.c.o'.
19 ninja: build stopped: subcommand failed.
20 Fuzzers build failed
21 ```
22 ---
23 src/basic/random-util.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26 diff --git a/src/basic/random-util.c b/src/basic/random-util.c
27 index 7c648575927..b8bbf2d418f 100644
28 --- a/src/basic/random-util.c
29 +++ b/src/basic/random-util.c
30 @@ -61,7 +61,7 @@ int rdrand(unsigned long *ret) {
31 "setc %1"
32 : "=r" (*ret),
33 "=qm" (success));
34 - msan_unpoison(&success, sizeof(sucess));
35 + msan_unpoison(&success, sizeof(success));
36 if (!success)
37 return -EAGAIN;
38