Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbWCOPfq (ORCPT ); Wed, 15 Mar 2006 10:35:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751973AbWCOPfp (ORCPT ); Wed, 15 Mar 2006 10:35:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:32229 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1751961AbWCOPfp (ORCPT ); Wed, 15 Mar 2006 10:35:45 -0500 From: Andreas Schwab To: Jiri Benc Cc: Bernd Petrovitsch , rusty@rustcorp.com.au, LKML Subject: Re: [PATCH] modpost: fix buffer overflow References: <20060315154436.4286d2ab@griffin.suse.cz> <1142434648.17627.5.camel@tara.firmix.at> <20060315160858.311e5c0e@griffin.suse.cz> X-Yow: Remember, in 2039, MOUSSE & PASTA will be available ONLY by prescription!! Date: Wed, 15 Mar 2006 16:35:43 +0100 In-Reply-To: <20060315160858.311e5c0e@griffin.suse.cz> (Jiri Benc's message of "Wed, 15 Mar 2006 16:08:58 +0100") Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 658 Lines: 21 Jiri Benc writes: > + while (buf->size - buf->pos < len + 1) > + buf->size += 128; What's wrong with buf->size = buf->pos + len + 1; Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra?e 5, 90409 N?rnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/