diff options
author | Bram Bonné <brambonne@google.com> | 2021-04-14 17:12:40 +0200 |
---|---|---|
committer | Bram Bonné <brambonne@google.com> | 2021-04-14 17:12:40 +0200 |
commit | 8553ea97aa9b150e3f266319a23d4d07743fa9c4 (patch) | |
tree | 31a8c0a4347b9ba445404e515dc81ca00b52fa79 | |
parent | 7a4416dc9424c1e5a97fc0432b36d5ebef415a0e (diff) | |
download | voip-8553ea97aa9b150e3f266319a23d4d07743fa9c4.tar.gz |
Open /dev/urandom in O_CLOEXEC mode
Test: atest FileDescriptorTest
Bug: 184278167
Change-Id: Ic2d3f75af6d0cc10546b8091bf0b1085591c88d9
-rw-r--r-- | src/jni/rtp/AudioGroup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jni/rtp/AudioGroup.cpp b/src/jni/rtp/AudioGroup.cpp index 5f9cae8..9efd11a 100644 --- a/src/jni/rtp/AudioGroup.cpp +++ b/src/jni/rtp/AudioGroup.cpp @@ -1078,7 +1078,7 @@ JNINativeMethod gMethods[] = { int registerAudioGroup(JNIEnv *env) { - gRandom = open("/dev/urandom", O_RDONLY); + gRandom = open("/dev/urandom", O_RDONLY | O_CLOEXEC); if (gRandom == -1) { ALOGE("urandom: %s", strerror(errno)); return -1; |