Skip to content
Snippets Groups Projects
Commit dbcfda52 authored by DONG Anyuan's avatar DONG Anyuan
Browse files

Fix Coverity Scan CID 261543 (Overrunning array...

Fix Coverity Scan CID 261543 (Overrunning array usim_data->usim_sqn_data.sqn_ms of 6 bytes at byte offset 6 using index 6 - i (which evaluates to 6).)
parent 1e14bee4
No related branches found
No related tags found
4 merge requests!650Release v1.1.0 Candidate,!620Resolve "Coverity Scan Fix (Week25)",!617Develop: Integration 2019 Week 25,!588Develop nr merge
......@@ -268,9 +268,9 @@ int usim_api_authenticate_test(usim_data_t *usim_data,
printf("usim_data->usim_sqn_data.sqn_ms %p\n", usim_data->usim_sqn_data.sqn_ms);
for (i = 0; i < USIM_API_SQNMS_SIZE; i++) {
//#warning "LG:BUG HERE TODO"
printf("i %d: ((uint8_t*)(usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - i] %d\n",i, ((uint8_t*)(usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - i]);
sqn_ms[USIM_API_SQNMS_SIZE - i] =
((uint8_t*)(usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - i];
printf("i %d: ((uint8_t*)(usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - 1 - i] %d\n",i, ((uint8_t*)(usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - 1 - i]);
sqn_ms[USIM_API_SQNMS_SIZE - 1 - i] =
((uint8_t*)(usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - 1 - i];
}
u8 sqnms[USIM_API_SQNMS_SIZE];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment