projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8410725
)
[media] s5c73m3: Fix off-by-one valid range checking for fie->index
author
Axel Lin
<
[email protected]
>
Tue, 30 Apr 2013 03:42:16 +0000
(
00:42
-0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Tue, 21 May 2013 11:36:54 +0000
(08:36 -0300)
Current code uses fie->index as array subscript, thus the valid value range
is 0 ... ARRAY_SIZE(s5c73m3_intervals) - 1.
Signed-off-by: Axel Lin <
[email protected]
>
Acked-by: Andrzej Hajda <
[email protected]
>
Signed-off-by: Sylwester Nawrocki <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/i2c/s5c73m3/s5c73m3-core.c
patch
|
blob
|
history
diff --git
a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index cb52438e53ac46c59548fef332a0bd50902a18f6..9eac5310942fd97b503290a1a2f38ef09cb01479 100644
(file)
--- a/
drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/
drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@
-956,7
+956,7
@@
static int s5c73m3_oif_enum_frame_interval(struct v4l2_subdev *sd,
if (fie->pad != OIF_SOURCE_PAD)
return -EINVAL;
- if (fie->index > ARRAY_SIZE(s5c73m3_intervals))
+ if (fie->index >
=
ARRAY_SIZE(s5c73m3_intervals))
return -EINVAL;
mutex_lock(&state->lock);