haven: hh_rm_core: Change datatype of num_fragments
Integer overflow can occur for a large value of req_buff_size because num_fragments is declared as u8. Declare it as int in order to prevent this from occurring. Change-Id: I9e3655af13134ec57d123317ebb7b287a7470a19 Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org> Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
3b06ec126c
commit
dd473e6c28
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -485,7 +485,7 @@ static int hh_rm_send_request(u32 message_id,
|
||||
const void *req_buff_curr = req_buff;
|
||||
struct hh_rm_rpc_hdr *hdr;
|
||||
unsigned long tx_flags;
|
||||
u8 num_fragments = 0;
|
||||
u32 num_fragments = 0;
|
||||
size_t payload_size;
|
||||
void *send_buff;
|
||||
int i, ret;
|
||||
|
||||
Reference in New Issue
Block a user