From patchwork Wed Dec 16 14:35:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 68372 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixoR005715 for ; Fri, 18 Dec 2009 04:46:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758068AbZLPOdy (ORCPT ); Wed, 16 Dec 2009 09:33:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757749AbZLPOdy (ORCPT ); Wed, 16 Dec 2009 09:33:54 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:50840 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756738AbZLPOdx (ORCPT ); Wed, 16 Dec 2009 09:33:53 -0500 Received: by bwz27 with SMTP id 27so739379bwz.21 for ; Wed, 16 Dec 2009 06:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=rJfvjhOQdXQL5zkD6njN2yVVBQzUwmYV8FAfwttlV/Y=; b=BClgWODrDDlL5bOJkpX4RnTfriViL+RMzKkQh3wxiys9OJtknbh0B5ENCKb3hDUeQK Ox5u1wxSJzf24PF6YLhsAXF8jR+Ulnp5NexUH8NJDfZZbLBtlIZNoH3IU/Uct4bYDME4 Qe6E7oYrAzyD65e3tJiTlwXpTb+2TMERaWfzM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=el6s8C4pA5BASS6CYenl8tis0XrQlBPncwqLCP53oW6Y+D5Y9Id3KQJJs3xc2QV3m1 2dTPisezpnc5g4HabmeGKdU1UMUUAA5Ye+Kz3TcB1CbKm7TmmpGQQv+8oFPekDZny3lK qaM+0VZxyXQvqhKra9EQ6+R9AMPIV86hZ3npA= Received: by 10.103.98.15 with SMTP id a15mr513636mum.46.1260974031312; Wed, 16 Dec 2009 06:33:51 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 7sm3295808mup.25.2009.12.16.06.33.50 (version=SSLv3 cipher=RC4-MD5); Wed, 16 Dec 2009 06:33:50 -0800 (PST) Message-ID: <4B28F041.2040603@gmail.com> Date: Wed, 16 Dec 2009 15:35:45 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4 MIME-Version: 1.0 To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] V4L/DVB: use correct size in put_v4l2_window32() Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c index 997975d..23ad218 100644 --- a/drivers/media/video/v4l2-compat-ioctl32.c +++ b/drivers/media/video/v4l2-compat-ioctl32.c @@ -288,7 +288,7 @@ static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) { - if (copy_to_user(&up->w, &kp->w, sizeof(up->w)) || + if (copy_to_user(&up->w, &kp->w, sizeof(kp->w)) || put_user(kp->field, &up->field) || put_user(kp->chromakey, &up->chromakey) || put_user(kp->clipcount, &up->clipcount))