mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
capget() and capset() may read or write more than one cap_user_data_t, depending on the version field of cap_user_header_t. Currently the code assumes it's just one, so MSan complains if an application uses version 2 or 3, where two cap_user_data_ts are used. Parse the header in order to determine the number of cap_user_data_ts. Also add a test. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D143660