From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4309 invoked by alias); 2 Aug 2002 11:07:58 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 4288 invoked from network); 2 Aug 2002 11:07:56 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 2 Aug 2002 11:07:56 -0000 Received: from Hermes.suse.de (Charybdis.suse.de [213.95.15.201]) by Cantor.suse.de (Postfix) with ESMTP id 25559145AA; Fri, 2 Aug 2002 13:07:56 +0200 (MEST) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: Jakub Jelinek Cc: Ulrich Drepper , Wolfram Gloger , libc-hacker@sources.redhat.com Subject: Re: [PATCH] xdr_array and calloc security fix References: <20020802004635.Y20867@sunsite.ms.mff.cuni.cz> <20020802092945.24679.qmail@md.dent.med.uni-muenchen.de> <3D4A5446.5030204@redhat.com> <3D4A55F0.5020007@redhat.com> <20020802115506.C20867@sunsite.ms.mff.cuni.cz> X-Yow: Of course, you UNDERSTAND about the PLAIDS in the SPIN CYCLE -- From: Andreas Schwab Date: Fri, 02 Aug 2002 04:07:00 -0000 In-Reply-To: <20020802115506.C20867@sunsite.ms.mff.cuni.cz> (Jakub Jelinek's message of "Fri, 2 Aug 2002 11:55:06 +0200") Message-ID: User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.3.50 (ia64-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-08/txt/msg00017.txt.bz2 Jakub Jelinek writes: |> On Fri, Aug 02, 2002 at 02:50:40AM -0700, Ulrich Drepper wrote: |> > Ulrich Drepper wrote: |> > |> > > It should be possible to have something like |> > > |> > > ((a | b) > (a * b)) |> > > |> > > for unsigned values. I'm not 100% sure, though. |> > |> > I mean, this is an approximation which lets us avoid the division in |> > many (most?) cases. |> |> Many. a=1 b=2 -> is this overflow? |> a=0x6000000 b=64 -> this would signal no overflow, while in fact But (a > a * b || b > a * b) should work, shouldn't it? Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."