* [patch 2/2] misc: mic: silence an overflow warning
@ 2016-02-12 6:44 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-02-12 6:44 UTC (permalink / raw)
To: Sudeep Dutt
Cc: Ashutosh Dixit, Greg Kroah-Hartman, linux-kernel, kernel-janitors
Static checkers complain that the this is a potential array overflow.
We verify that it's not on the next line so this code is OK, but
static checker warnings are annoying.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
We would have caught CVE-2015-5327 if we had ordered it to check first
before using the offset.
diff --git a/drivers/misc/mic/vop/vop_vringh.c b/drivers/misc/mic/vop/vop_vringh.c
index c3613f3..e94c7fb 100644
--- a/drivers/misc/mic/vop/vop_vringh.c
+++ b/drivers/misc/mic/vop/vop_vringh.c
@@ -848,12 +848,13 @@ static int vop_virtio_copy_desc(struct vop_vdev *vdev,
struct mic_copy_desc *copy)
{
int err;
- struct vop_vringh *vvr = &vdev->vvr[copy->vr_idx];
+ struct vop_vringh *vvr;
err = vop_verify_copy_args(vdev, copy);
if (err)
return err;
+ vvr = &vdev->vvr[copy->vr_idx];
mutex_lock(&vvr->vr_mutex);
if (!vop_vdevup(vdev)) {
err = -ENODEV;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-12 6:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 6:44 [patch 2/2] misc: mic: silence an overflow warning Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).