summaryrefslogtreecommitdiff
path: root/v4l_experimental/pvrusb2/pvrusb2-v4l2.c
diff options
context:
space:
mode:
authorMike Isely <devnull@localhost>2006-01-21 04:44:52 +0000
committerMike Isely <devnull@localhost>2006-01-21 04:44:52 +0000
commitc2adc8ccca8b66d34544b8cf3d67eda633ab586f (patch)
treef4332405f8181964abb87fca425a9e84caf44792 /v4l_experimental/pvrusb2/pvrusb2-v4l2.c
parent522fbf99045e894f09f78b66ba8289a462902afa (diff)
downloadmediapointer-dvb-s2-c2adc8ccca8b66d34544b8cf3d67eda633ab586f.tar.gz
mediapointer-dvb-s2-c2adc8ccca8b66d34544b8cf3d67eda633ab586f.tar.bz2
Solve pvrusb2 compilation warning
We need to be checking the return value for copy_to_user(); for some reason my builds weren't catching this which is why it went unfixed until now. From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'v4l_experimental/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-v4l2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/v4l_experimental/pvrusb2/pvrusb2-v4l2.c b/v4l_experimental/pvrusb2/pvrusb2-v4l2.c
index be5c84ae0..9449f775f 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-v4l2.c
+++ b/v4l_experimental/pvrusb2/pvrusb2-v4l2.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-v4l2.c,v 1.7 2006/01/14 22:09:52 mcisely Exp $
+ * $Id: pvrusb2-v4l2.c,v 1.8 2006/01/21 04:44:52 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
* Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
@@ -1073,7 +1073,10 @@ static ssize_t pvr2_v4l2_read(struct file *file,
break;
}
if (!c2) break;
- copy_to_user(buff,tbuf,c2);
+ if (copy_to_user(buff,tbuf,c2)) {
+ tcnt = -EFAULT;
+ break;
+ }
offs += c2;
tcnt += c2;
buff += c2;