From patchwork Thu May 21 20:32:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 27501 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id F1AA9B7063 for ; Fri, 22 May 2009 06:33:22 +1000 (EST) Received: by ozlabs.org (Postfix) id E3486DDF94; Fri, 22 May 2009 06:33:22 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 7F975DDF8A for ; Fri, 22 May 2009 06:33:22 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755930AbZEUUcy (ORCPT ); Thu, 21 May 2009 16:32:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755082AbZEUUcy (ORCPT ); Thu, 21 May 2009 16:32:54 -0400 Received: from mail-ew0-f176.google.com ([209.85.219.176]:49491 "EHLO mail-ew0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755264AbZEUUcx (ORCPT ); Thu, 21 May 2009 16:32:53 -0400 Received: by ewy24 with SMTP id 24so1470416ewy.37 for ; Thu, 21 May 2009 13:32:54 -0700 (PDT) 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:cc:subject:content-type :content-transfer-encoding; bh=wmmwmqsPavjnIAyHx2HIz2wjpEBcAlgk3EWfXQPcJLk=; b=P/JvlDxSHeSmd2AUZ3NglaNI4LKVlAqeeep3Yr3v0JAS6gP897GqPFPlstDfofyRLJ XyFW9UQQ2Sdw8IEVwEut0+WfbD1umhJGFxt1zixAjQ5FQ0UOav1S7crL28Tr+BMe8W9J 7aNFrAol4kLRFrpZRkrsKDslwShegDoUSEOzE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=Qr+9+FksMxU9JcE+LcEkrvTXSfDxLAbPT+ZpVmCBR8XNc85XFtCBcGG30GD8dZEX2i Zg0oza5etyPrxIaDNBiwPfIqEljfYgxNo4USoTyuJOEDISnPzAAmzKT0n5tNl+n206Yi 1EZv0RndHmcGGa9Mz28yr5cckhovAlaioeEz4= Received: by 10.210.20.17 with SMTP id 17mr2733264ebt.57.1242937974160; Thu, 21 May 2009 13:32:54 -0700 (PDT) Received: from ?192.168.1.2? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 28sm4682171eyg.24.2009.05.21.13.32.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 May 2009 13:32:53 -0700 (PDT) Message-ID: <4A15BA76.6080007@gmail.com> Date: Thu, 21 May 2009 22:32:54 +0200 From: Roel Kluin User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: hjlipp@web.de CC: gigaset307x-common@lists.sourceforge.net, netdev@vger.kernel.org, Andrew Morton Subject: [PATCH] gigaset: beyond ARRAY_SIZE of iwb->data Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Do not go beyond ARRAY_SIZE of iwb->data Signed-off-by: Roel Kluin --- Sorry for the dup, the header was incorrect. This is against linux-next. -- To unsubscribe from this list: send the line "unsubscribe netdev" 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/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index fbce522..5569a6e 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c @@ -177,7 +177,7 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size) return -EINVAL; } src = iwb->read; - if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD || + if (unlikely(limit >= BAS_OUTBUFSIZE + BAS_OUTBUFPAD || (read < src && limit >= src))) { err("isoc write buffer frame reservation violated"); return -EFAULT;