From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: trunk r113804: * decompress.c: Fix bugs with large buffers and weird inputs. Date: Tue, 13 Aug 2013 14:47:16 -0700 Organization: UCLA Computer Science Department Message-ID: <520AA964.7040203@cs.ucla.edu> References: <520A4ABC.2000204@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1376430455 5037 80.91.229.3 (13 Aug 2013 21:47:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Aug 2013 21:47:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 13 23:47:36 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V9MRC-0005Tr-MO for ged-emacs-devel@m.gmane.org; Tue, 13 Aug 2013 23:47:34 +0200 Original-Received: from localhost ([::1]:48537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9MRC-0007E8-8Y for ged-emacs-devel@m.gmane.org; Tue, 13 Aug 2013 17:47:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9MR3-0007Dd-Au for emacs-devel@gnu.org; Tue, 13 Aug 2013 17:47:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9MQw-0003ZH-1Z for emacs-devel@gnu.org; Tue, 13 Aug 2013 17:47:25 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:53372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9MQv-0003ZA-Rd for emacs-devel@gnu.org; Tue, 13 Aug 2013 17:47:17 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D9E6839E8109; Tue, 13 Aug 2013 14:47:16 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ndOKLPKDPAbX; Tue, 13 Aug 2013 14:47:16 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-108-49-126.lsanca.fios.verizon.net [71.108.49.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8A12D39E8105; Tue, 13 Aug 2013 14:47:16 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 In-Reply-To: X-Enigmail-Version: 1.5.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162683 Archived-At: Lars Magne Ingebrigtsen wrote: > What's with all the ptrdiff_t's when > inflate only takes ints, anyway? 'inflate' takes unsigned ints, not ints. Anyway, I tried rewriting the code along the line you suggested. 'buffer_size' is not a good name, though, as multiple buffers are in play here, so I continued to call that constant 'avail_out' by analogy with the zlib avail_out.