From patchwork Mon Mar 22 12:08:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 87403 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2MC94QG011076 for ; Mon, 22 Mar 2010 12:09:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753784Ab0CVMJA (ORCPT ); Mon, 22 Mar 2010 08:09:00 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:54321 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481Ab0CVMI7 (ORCPT ); Mon, 22 Mar 2010 08:08:59 -0400 Received: by bwz1 with SMTP id 1so1815167bwz.21 for ; Mon, 22 Mar 2010 05:08:58 -0700 (PDT) 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=CThaWxYDGETF/Oq/9pqJvAQB77zOCxlE3bq1zBh+5oI=; b=uox2jvhnnsYvKWl8mtaukx+BOaVf/ntAmn/MiEKKxtY3jJtKqSNlog81E6zWC9v4vQ j9ek6tIm8VlvfQxxle7fxpOPSBV1j67xyTgNDMpOZgCCNSWa57NBpExmG1RE0KdETZXM v2YMfHlEDYQuIhxRSnuF8yr7VxJ4jSOmS1rB4= 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=ApbKftr0icgzURmRrRvRdMvrpFzcfdBDhN1fgCd67TwfytUgRYmpfUgpD4X4Xk78jW b5Zd9XdaAkFxQIzDu1n7/2Yc7szn8Ax0WDLm3r3tAjX25XE+slf7XUKCgsk4SRZpTzmd k+jFiGXwFZRXjX2bzdXPANImNDKssMI9zglX8= Received: by 10.204.141.69 with SMTP id l5mr1707921bku.64.1269259737778; Mon, 22 Mar 2010 05:08:57 -0700 (PDT) Received: from bicker ([196.43.68.63]) by mx.google.com with ESMTPS id l1sm19331743bkl.20.2010.03.22.05.08.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Mar 2010 05:08:57 -0700 (PDT) Date: Mon, 22 Mar 2010 15:08:49 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Steven Toth , Laurent Pinchart , Michael Krufky , Alexey Dobriyan , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] cx23885: strcpy() => strlcpy() Message-ID: <20100322120849.GF21571@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 (demeter.kernel.org [140.211.167.41]); Mon, 22 Mar 2010 12:09:04 +0000 (UTC) diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index 2ab97ad..6fff89d 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c @@ -1355,7 +1355,7 @@ static int vidioc_querycap(struct file *file, void *priv, struct cx23885_dev *dev = fh->dev; struct cx23885_tsport *tsport = &dev->ts1; - strcpy(cap->driver, dev->name); + strlcpy(cap->driver, dev->name, sizeof(cap->driver)); strlcpy(cap->card, cx23885_boards[tsport->dev->board].name, sizeof(cap->card)); sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));