Bug 1782988 - Fix use of arc4random_buf use in ping.cpp. r=gsvelto
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 9 Aug 2022 20:42:44 +0000 (20:42 +0000)
committerMike Hommey <glandium@debian.org>
Tue, 15 Nov 2022 21:20:30 +0000 (21:20 +0000)
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

index 49c6e2b7361c1d0f30745d59de4c4502713f1645..0d803841987dd6fa7f36295b4024ed19ee23b4ba 100644 (file)
@@ -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);