diff options
author | Pauli Virtanen <pav@iki.fi> | 2021-09-05 18:43:55 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-09-06 21:36:10 -0700 |
commit | 0d09a5d339634ffd062dccf03739cb7c29abd060 (patch) | |
tree | 76f221a9172a6aa10db347099af993b220d6ed24 /android | |
parent | 64e7ce42b19122f0ad47a4a32e6311bdffb38200 (diff) | |
download | bluez-0d09a5d339634ffd062dccf03739cb7c29abd060.tar.gz |
shared/util: use 64-bit bitmap in util_get/clear_uid
The util_get/clear_uid functions use int type for bitmap, and are used
e.g. for SEID allocation. However, valid SEIDs are in range 1 to 0x3E
(AVDTP spec v1.3, 8.20.1), and 8*sizeof(int) is often smaller than 0x3E.
The function is also used in src/advertising.c, but an explicit maximum
value is always provided, so growing the bitmap size is safe there.
Use 64-bit bitmap instead, to be able to cover the valid range.
Diffstat (limited to 'android')
-rw-r--r-- | android/avdtp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/avdtp.c b/android/avdtp.c index 8c2930ec1..a261a8e5f 100644 --- a/android/avdtp.c +++ b/android/avdtp.c @@ -34,7 +34,7 @@ #include "../profiles/audio/a2dp-codecs.h" #define MAX_SEID 0x3E -static unsigned int seids; +static uint64_t seids; #ifndef MAX # define MAX(x, y) ((x) > (y) ? (x) : (y)) |