diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2019-03-11 11:57:28 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2019-03-11 11:57:28 -0700 |
commit | 4d916a1ece29840a41de7f443ad8833aff541b63 (patch) | |
tree | ee790f1d88d9c664f07ae78242f3b5da9ea9c236 /libcutils/native_handle.cpp | |
parent | fdfb9a0113abc4b91859f2e4dfd05b1c0ca018b0 (diff) | |
parent | 5d1d32dcbffaede882c140ce5f00502135cd3f7e (diff) |
DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I16a546dc24d3cf980ad7ab09895c0d97ee436224
Diffstat (limited to 'libcutils/native_handle.cpp')
-rw-r--r-- | libcutils/native_handle.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libcutils/native_handle.cpp b/libcutils/native_handle.cpp index 66f7a3d593..b409e5b9d8 100644 --- a/libcutils/native_handle.cpp +++ b/libcutils/native_handle.cpp @@ -22,9 +22,6 @@ #include <string.h> #include <unistd.h> -static const int kMaxNativeFds = 1024; -static const int kMaxNativeInts = 1024; - native_handle_t* native_handle_init(char* storage, int numFds, int numInts) { if ((uintptr_t) storage % alignof(native_handle_t)) { errno = EINVAL; @@ -39,7 +36,8 @@ native_handle_t* native_handle_init(char* storage, int numFds, int numInts) { } native_handle_t* native_handle_create(int numFds, int numInts) { - if (numFds < 0 || numInts < 0 || numFds > kMaxNativeFds || numInts > kMaxNativeInts) { + if (numFds < 0 || numInts < 0 || numFds > NATIVE_HANDLE_MAX_FDS || + numInts > NATIVE_HANDLE_MAX_INTS) { errno = EINVAL; return NULL; } |