From patchwork Sat Dec 4 21:05:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasiliy Kulikov X-Patchwork-Id: 380421 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 oB531meU006973 for ; Sun, 5 Dec 2010 03:01:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756077Ab0LDVF3 (ORCPT ); Sat, 4 Dec 2010 16:05:29 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:55337 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756057Ab0LDVF2 (ORCPT ); Sat, 4 Dec 2010 16:05:28 -0500 Received: by eye27 with SMTP id 27so5652484eye.19 for ; Sat, 04 Dec 2010 13:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=byC7swcpTrTrn+eBhMO7vPMxExNHxb5+aewt62GaegU=; b=Mt/xpYlTKeDqk1LntrDisp44X1lHXJ4pt4W8RwrxCzyvVXwYdR6sBJOYeKQcI0CMFj lfz2XSoh7mLNmpR2gWGqCaqUG6bcJDyGdXu1g3J5ke7NTLRCS9ugnsoplT48epOFmhyT +cdsG9V9Dahx6mFWTiQMuSyNDJqW7zVs0G8Xk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=nmKCZfypwIi29ucKxpZcNqXUGW9WC/nknq0jOj3nzlylJ6ywszcZEg7ENMpcJC3xh8 SMsuDpSueWEMv2YiTNwnPhWItbNTNl40TzeYYugPcXlRxeCjM7bewcTEPnmrGqEBAfcY GYRJ2ayFuiSJ/5XHNyKZf5ZwJhtRQPHO89bqk= Received: by 10.14.119.197 with SMTP id n45mr3056679eeh.28.1291496726193; Sat, 04 Dec 2010 13:05:26 -0800 (PST) Received: from localhost (ppp85-141-140-219.pppoe.mtu-net.ru [85.141.140.219]) by mx.google.com with ESMTPS id b52sm2944047eei.1.2010.12.04.13.05.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 04 Dec 2010 13:05:25 -0800 (PST) Date: Sun, 5 Dec 2010 00:05:22 +0300 From: Vasiliy Kulikov To: Dan Carpenter , kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , David =?iso-8859-1?Q?H=E4rdeman?= , Jarod Wilson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] media: rc: ir-lirc-codec: fix integer overflow Message-ID: <20101204210522.GA5244@albatros> References: <20101202045126.GA1784@bicker> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20101202045126.GA1784@bicker> 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]); Sun, 05 Dec 2010 03:01:56 +0000 (UTC) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 1e87ee8..a7e91e6 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -100,7 +100,8 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char *buf, struct lirc_codec *lirc; struct rc_dev *dev; int *txbuf; /* buffer with values to transmit */ - int ret = 0, count; + int ret = 0; + size_t count; lirc = lirc_get_pdata(file); if (!lirc)