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: 5171 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Mon, 20 Dec 2010 11:35:55 -0200 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from ) id 1PUfu7-0001Sl-DB for mchehab@gaivota; Mon, 20 Dec 2010 11:35:55 -0200 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.17) for (single-drop); Mon, 20 Dec 2010 11:35:55 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PUfFG-0005TP-Dv; Mon, 20 Dec 2010 12:53:42 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757373Ab0LTMxj (ORCPT + 1 other); 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) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab This is a copy and paste error. It should be using sizeof(cap->driver) instead of sizeof(cap->card). Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 |