projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a1ee75
)
libv4lconvert.c: fix memset bug discovered by v4l2-compliance.
author
Hans Verkuil
<hans.verkuil@cisco.com>
Thu, 23 Jun 2011 14:13:37 +0000
(16:13 +0200)
committer
Hans Verkuil
<hans.verkuil@cisco.com>
Thu, 23 Jun 2011 14:13:37 +0000
(16:13 +0200)
The size of the reserved array is 4 * sizeof(u32) = 16. So only the first
element is now zeroed. Use sizeof(reserved) instead.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
lib/libv4lconvert/libv4lconvert.c
patch
|
blob
|
history
diff --git
a/lib/libv4lconvert/libv4lconvert.c
b/lib/libv4lconvert/libv4lconvert.c
index
6935e65
..
a15f234
100644
(file)
--- a/
lib/libv4lconvert/libv4lconvert.c
+++ b/
lib/libv4lconvert/libv4lconvert.c
@@
-247,7
+247,7
@@
int v4lconvert_enum_fmt(struct v4lconvert_data *data, struct v4l2_fmtdesc *fmt)
fmt->description[2] = (faked_fmts[i] >> 16) & 0xff;
fmt->description[3] = faked_fmts[i] >> 24;
fmt->description[4] = '\0';
- memset(fmt->reserved, 0,
4
);
+ memset(fmt->reserved, 0,
sizeof(fmt->reserved)
);
return 0;
}