diff options
| author | Mohammed Nayeem Ur Rahman <mohara@codeaurora.org> | 2018-10-10 16:34:37 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-01-08 04:48:11 -0800 |
| commit | 9de27e66a625ee2ee697c56487ccec6868349500 (patch) | |
| tree | d7364500f16f63e63d9f492960f124ea594fe37c /drivers/char | |
| parent | 5ac717112b1ce8095ede2c02019116cf689315c6 (diff) | |
msm: adsprpc: Fix memory out of bounds error
Fixes memory out of bound error.
Change-Id: I9cc11b5231ba3654588eadf7a7adca68aff35684
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
Diffstat (limited to 'drivers/char')
| -rw-r--r-- | drivers/char/adsprpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 3da8f64444a3..b042a3d57de9 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -2931,7 +2931,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) if (err) return err; snprintf(strpid, PID_SIZE, "%d", current->pid); - buf_size = strlen(current->comm) + strlen(strpid) + 1; + buf_size = strlen(current->comm) + strlen("_") + strlen(strpid) + 1; fl->debug_buf = kzalloc(buf_size, GFP_KERNEL); snprintf(fl->debug_buf, UL_SIZE, "%.10s%s%d", current->comm, "_", current->pid); |
