Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56c533df authored by Janis Danisevskis's avatar Janis Danisevskis
Browse files

Fix disagreement of client_id/app_data pointer semantic

KM1/KM2 implementations should treat nullptr and KeymasterBlob{nullptr, 0}
equally when passed in as client_id or app_data. However, trusty KM1
treats them differently.

Bug: 113110105
Bug: 113084196
Change-Id: Ie0e2b5d60d808e4f7a8e48aeb4c694268f9bc0a1
parent ca10a6ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -122,10 +122,10 @@ template <typename RequestType>
void AddClientAndAppData(const keymaster_blob_t* client_id, const keymaster_blob_t* app_data,
                         RequestType* request) {
    request->additional_params.Clear();
    if (client_id) {
    if (client_id && client_id->data_length > 0) {
        request->additional_params.push_back(TAG_APPLICATION_ID, *client_id);
    }
    if (app_data) {
    if (app_data && app_data->data_length > 0) {
        request->additional_params.push_back(TAG_APPLICATION_DATA, *app_data);
    }
}