qbt1000: Terminate fingerprint TA name with null
Terminate the string, coming from userspace and containing the name of fingerprint trusted app, with null character, to make sure kernel memory does not leak into logs Change-Id: I1668a64fcb6747ce3ef3b1ee6321fa5fa4a1798a CRs-Fixed: 2029409 Signed-off-by: Abir Ghosh <abirg@codeaurora.org>
This commit is contained in:
parent
5d78c03af8
commit
07f699a324
1 changed files with 3 additions and 1 deletions
|
@ -414,6 +414,7 @@ static long qbt1000_ioctl(struct file *file, unsigned cmd, unsigned long arg)
|
|||
}
|
||||
|
||||
pr_debug("app %s load before\n", app.name);
|
||||
app.name[MAX_NAME_SIZE - 1] = '\0';
|
||||
|
||||
/* start the TZ app */
|
||||
rc = qseecom_start_app(
|
||||
|
@ -427,7 +428,8 @@ static long qbt1000_ioctl(struct file *file, unsigned cmd, unsigned long arg)
|
|||
pr_err("App %s failed to set bw\n", app.name);
|
||||
}
|
||||
} else {
|
||||
pr_err("app %s failed to load\n", app.name);
|
||||
dev_err(drvdata->dev, "%s: Fingerprint Trusted App failed to load\n",
|
||||
__func__);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue