From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A8AB21F66E for ; Wed, 12 Aug 2020 12:29:37 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 998F53850420; Wed, 12 Aug 2020 12:29:36 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 2CBA53857C44 for ; Wed, 12 Aug 2020 12:29:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2CBA53857C44 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BEA5DAFA0; Wed, 12 Aug 2020 12:29:54 +0000 (UTC) Subject: Re: [PATCH] Use size_t for mallinfo fields. To: DJ Delorie , Florian Weimer References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Wed, 12 Aug 2020 14:29:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libc-alpha@sourceware.org, schwab@linux-m68k.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 8/11/20 7:08 PM, DJ Delorie wrote: > Florian Weimer writes: >> DJ, what do you think about this patch? > > I have no real problems with the patch, but two minor things that could > be handled in a follow-up patch... Thank you for the review. Can I read it as ready to go into master? > > 1. The copy code for the old function doesn't handle overflow. We've > seen bug reports for this before so should consider the edge cases. > IMHO if a size_t value is larger than MAXINT, then MAXINT (or -1) > should be stored instead of a randomly truncated value. > > 2. The new documentation makes no mention of the older "compatible" > interface. > Both comments are valid to me and I can address them in a follow-up patch. Martin