mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
camera: fix Out-of-bounds error from Coverity tool [1/1]
PD#SWPL-16538 Problem: Out-of-bounds error Solution: fix Out-of-bounds error Verify: verified on w400 Change-Id: I5907acba3f180f5a7cf5417840d2aa5f0f19005b Signed-off-by: dong.wei <dong.wei@amlogic.com>
This commit is contained in:
@@ -147,13 +147,10 @@ static ssize_t mirror_read(struct class *cla, struct class_attribute *attr,
|
||||
|
||||
static ssize_t mirror_write(struct class *cla,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
ssize_t size;
|
||||
char *endp = "1";
|
||||
const char *buf, size_t count){
|
||||
unsigned long endp;
|
||||
|
||||
camera_mirror_flag = kstrtoul(buf, 0, (unsigned long *)endp);
|
||||
size = endp - buf;
|
||||
camera_mirror_flag = kstrtoul(buf, 0, &endp);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user