Merge "scsi: ufs: Fix stack overflow read in ufs debugfs driver"
This commit is contained in:
commit
b895f07a61
1 changed files with 2 additions and 1 deletions
|
@ -111,7 +111,7 @@ static ssize_t ufs_qcom_dbg_testbus_cfg_write(struct file *file,
|
||||||
loff_t *ppos)
|
loff_t *ppos)
|
||||||
{
|
{
|
||||||
struct ufs_qcom_host *host = file->f_mapping->host->i_private;
|
struct ufs_qcom_host *host = file->f_mapping->host->i_private;
|
||||||
char configuration[TESTBUS_CFG_BUFF_LINE_SIZE] = {0};
|
char configuration[TESTBUS_CFG_BUFF_LINE_SIZE] = {'\0'};
|
||||||
loff_t buff_pos = 0;
|
loff_t buff_pos = 0;
|
||||||
char *comma;
|
char *comma;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -128,6 +128,7 @@ static ssize_t ufs_qcom_dbg_testbus_cfg_write(struct file *file,
|
||||||
__func__);
|
__func__);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
configuration[ret] = '\0';
|
||||||
|
|
||||||
comma = strnchr(configuration, TESTBUS_CFG_BUFF_LINE_SIZE, ',');
|
comma = strnchr(configuration, TESTBUS_CFG_BUFF_LINE_SIZE, ',');
|
||||||
if (!comma || comma == configuration) {
|
if (!comma || comma == configuration) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue