From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: oops? read/write vs type of length parameter Date: Tue, 12 Apr 2011 00:44:03 -0400 Message-ID: References: <87wrj1jhfc.fsf@rho.meyering.net> <87d3ktjb9l.fsf@rho.meyering.net> <877hb1j7lz.fsf@rho.meyering.net> <877hb1m0jy.fsf@fencepost.gnu.org> <87wrj0fo8x.fsf@rho.meyering.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1302583453 9907 80.91.229.12 (12 Apr 2011 04:44:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2011 04:44:13 +0000 (UTC) Cc: dak@gnu.org, emacs-devel@gnu.org To: Jim Meyering Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 06:44:07 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from [140.186.70.17] (helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9VSR-0004ZU-FD for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 06:44:07 +0200 Original-Received: from localhost ([::1]:42848 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VSQ-0001ZD-QA for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 00:44:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VSO-0001Yy-Di for emacs-devel@gnu.org; Tue, 12 Apr 2011 00:44:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9VSN-0007f2-BC for emacs-devel@gnu.org; Tue, 12 Apr 2011 00:44:04 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:35370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VSN-0007ey-9e for emacs-devel@gnu.org; Tue, 12 Apr 2011 00:44:03 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Q9VSN-0001J5-13; Tue, 12 Apr 2011 00:44:03 -0400 In-reply-to: <87wrj0fo8x.fsf@rho.meyering.net> (message from Jim Meyering on Mon, 11 Apr 2011 23:54:06 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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 X-Broken-Reverse-DNS: no host name found for IP address 140.186.70.17 Xref: news.gmane.org gmane.emacs.devel:138421 Archived-At: > From: Jim Meyering > Date: Mon, 11 Apr 2011 23:54:06 +0200 > Cc: emacs-devel@gnu.org > > Of course the extra bit doesn't matter when you start with 64, > but starting with only 32, using an unsigned "length" would > avoid that unnecessary limit. I'm not sure what you are suggesting (``starting with only 32, using an unsigned "length"''), but if this means to use a 32-bit type as the last argument to emacs_write, then that was the bug I fixed by using ssize_t instead of an int. The bug prevented Emacs from saving regions larger than INT_MAX.