projects
/
linux-drm-fsl-dcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[linux-drm-fsl-dcu.git]
/
drivers
/
media
/
v4l2-core
/
videobuf2-core.c
diff --git
a/drivers/media/v4l2-core/videobuf2-core.c
b/drivers/media/v4l2-core/videobuf2-core.c
index 91412d463ba0e1eba3a311514f42dbe086a587a6..b19b306c8f7f533d3112db441f692e57bd76638d 100644
(file)
--- a/
drivers/media/v4l2-core/videobuf2-core.c
+++ b/
drivers/media/v4l2-core/videobuf2-core.c
@@
-354,7
+354,9
@@
static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
if (b->m.planes[plane].bytesused > length)
return -EINVAL;
- if (b->m.planes[plane].data_offset >=
+
+ if (b->m.planes[plane].data_offset > 0 &&
+ b->m.planes[plane].data_offset >=
b->m.planes[plane].bytesused)
return -EINVAL;
}