From patchwork Mon Dec 20 12:53:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 420641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBKCrgqQ005771 for ; Mon, 20 Dec 2010 12:53:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757373Ab0LTMxj (ORCPT ); Mon, 20 Dec 2010 07:53:39 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:37138 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775Ab0LTMxi (ORCPT ); Mon, 20 Dec 2010 07:53:38 -0500 Received: by wwa36 with SMTP id 36so2897130wwa.1 for ; Mon, 20 Dec 2010 04:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=P3b1mzAAYdbGzEdq5meYODSqjyd93DfeZCfLYpeyEdk=; b=fhq6RBoXKJZ1RVVgShjaNYk60j1h8LQdU+WRYHEC9/bw1b/FWhm+i88AxHFoIhoL0L BiATlgcuTRwZu8u7Pe3B7exG/UtoijGvlxY/g+JfnnvohT45nobUnXwfTE12BuZo8Otj 6tO0xqd32NYqx1bSpd0vN0kFiC3EswUrRgEpM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=xNvBTzNhfHrsZoWHPRI8nSf7kAR5TKRIGk3x0FI3ffA3u24faTESSnI5AXukNmm6u0 GcsnEDF7ksp8lO0geyXesKXF9ejYs0Ae2SNKnEdFYiAaNcfw/KvOWtOTg3NrT8xlB98e toG59HvTrLHDdj8Rsi0Uvvp1vrWDYHZkbNzjc= Received: by 10.227.134.206 with SMTP id k14mr2642625wbt.5.1292849617217; Mon, 20 Dec 2010 04:53:37 -0800 (PST) Received: from bicker ([41.202.225.144]) by mx.google.com with ESMTPS id 11sm2672405wbj.19.2010.12.20.04.53.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Dec 2010 04:53:36 -0800 (PST) Date: Mon, 20 Dec 2010 15:53:16 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Richard =?iso-8859-1?Q?R=F6jfors?= , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -next] [media] timblogiw: too large value for strncpy() Message-ID: <20101220125316.GW1936@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 20 Dec 2010 12:53:43 +0000 (UTC) diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c index cf48aa9..ef1b7a5 100644 --- a/drivers/media/video/timblogiw.c +++ b/drivers/media/video/timblogiw.c @@ -241,7 +241,7 @@ static int timblogiw_querycap(struct file *file, void *priv, dev_dbg(&vdev->dev, "%s: Entry\n", __func__); memset(cap, 0, sizeof(*cap)); strncpy(cap->card, TIMBLOGIWIN_NAME, sizeof(cap->card)-1); - strncpy(cap->driver, DRIVER_NAME, sizeof(cap->card)-1); + strncpy(cap->driver, DRIVER_NAME, sizeof(cap->driver) - 1); strlcpy(cap->bus_info, vdev->name, sizeof(cap->bus_info)); cap->version = TIMBLOGIW_VERSION_CODE; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |