Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66d8904b authored by Mohammed Nayeem Ur Rahman's avatar Mohammed Nayeem Ur Rahman
Browse files

msm: adsprpc: Fix memory out of bounds error



At present the kernel memory allocation does
not allocate memmory for character "_" in debugfs
file format i.e. <file>_<pid>.

This patch fixes memory out of bound error by
allocating memory to the under-score("_")character.

Change-Id: I9cc11b5231ba3654588eadf7a7adca68aff35684
Signed-off-by: default avatarMohammed Nayeem Ur Rahman <mohara@codeaurora.org>
parent 1def2a4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3185,7 +3185,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
		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;
	VERIFY(err, NULL != (fl->debug_buf = kzalloc(buf_size, GFP_KERNEL)));
	if (err) {
		kfree(fl);