diff options
Diffstat (limited to 'v4l_experimental/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | v4l_experimental/pvrusb2/pvrusb2-v4l2.c | 7 |
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; |