Commit: 0d09a5d339634ffd062dccf03739cb7c29abd060
Parent: 64e7ce42b19122f0ad47a4a32e6311bdffb38200
Author: Pauli Virtanen <pav@iki.fi>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2021-09-07 07:36:10
Tree: 76f221a9172a6aa10db347099af993b220d6ed24

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

M android/avdtp.c | 2 +-
M profiles/audio/avdtp.c | 2 +-
M src/advertising.c | 2 +-
M src/shared/util.c | 16 +++++++- - - - - - - - -
M src/shared/util.h | 4 ++- -
M unit/test-avdtp.c | 2 +-

6 files changed, 13 insertions(+), 15 deletions(-)

View Full Diff | Patch