diff options
Diffstat (limited to 'drivers/staging/sep/sep_driver.c')
-rw-r--r-- | drivers/staging/sep/sep_driver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 8ac3faea2d2f..6b3d156d4140 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -1235,7 +1235,7 @@ static void sep_build_lli_table(struct sep_device *sep, /* Counter of lli array entry */ u32 array_counter; - /* Init currrent table data size and lli array entry counter */ + /* Init current table data size and lli array entry counter */ curr_table_data_size = 0; array_counter = 0; *num_table_entries_ptr = 1; @@ -2120,6 +2120,8 @@ static int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep, } } if (tail_size) { + if (tail_size > sizeof(dcb_table_ptr->tail_data)) + return -EINVAL; if (is_kva == true) { memcpy(dcb_table_ptr->tail_data, (void *)(app_in_address + data_in_size - |