From 993eb76e919199dc86c01eb296b8855f5eea10d5 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 9 Aug 2022 20:42:44 +0000 Subject: [PATCH] Bug 1782988 - Fix use of arc4random_buf use in ping.cpp. r=gsvelto The code was probably never built before glibc 2.36, because before that, only Android and some BSDs had arc4random_buf, but none of those actually built this code. Differential Revision: https://phabricator.services.mozilla.com/D154024 Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1782988-Fix-use-of-arc4random_buf-use-in-ping.cp.patch --- toolkit/crashreporter/client/ping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/crashreporter/client/ping.cpp b/toolkit/crashreporter/client/ping.cpp index 49c6e2b7361..0d803841987 100644 --- a/toolkit/crashreporter/client/ping.cpp +++ b/toolkit/crashreporter/client/ping.cpp @@ -53,7 +53,7 @@ static string GenerateUUID() { CFRelease(uuid); #elif defined(HAVE_ARC4RANDOM_BUF) // Android, BSD, ... - arc4random_buf(id, sizeof(UUID)); + arc4random_buf(&id, sizeof(UUID)); #else // Linux int fd = open("/dev/urandom", O_RDONLY); -- 2.30.2