From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: Re: Gnus crash Date: Fri, 17 Jan 2003 11:20:59 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200301170220.LAA12538@etlken.m17n.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1042770187 8688 80.91.224.249 (17 Jan 2003 02:23:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 17 Jan 2003 02:23:07 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ZM9u-0002Fd-00 for ; Fri, 17 Jan 2003 03:23:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ZMAr-0005Xj-00 for gnu-bug-gnu-emacs@m.gmane.org; Thu, 16 Jan 2003 21:24:01 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ZMAT-0005LQ-00 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2003 21:23:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ZM9u-0003xK-00 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2003 21:23:07 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ZM8A-0002cq-00 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2003 21:21:14 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0H2L0k23074; Fri, 17 Jan 2003 11:21:00 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0H2KxR17342; Fri, 17 Jan 2003 11:20:59 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id LAA12538; Fri, 17 Jan 2003 11:20:59 +0900 (JST) Original-To: emufer@terra.es In-reply-to: (emufer@terra.es) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4225 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4225 In article , "Eduardo =3D?iso-8859-1?q?Mu=3DF1oz?= =3D" writes: > A korean spam message manged to crash Emacs while=20 > using Gnus. I can reproduce the crash with only two=20 > files, a bare bones .gnus and an one-message mbox. > I included both files at the en of the post. > The home dir to reproduce the crash looks like this: > Home/ > .gnus > Mail/ > Inbox > Steps to reproduce the crash > start emacs > M-x gnus > No server defined (or somesuch) (Continue? y or n) y RET > G m RET Inbox RET nnfolder RET > ;; Now you can see the Inbox group > RET ;; enter the group and voil=E1 Emacs crashes > Emacs Abort Dialog > Select Abor/Retry/Ignore=20 > -> Retry=20 > Exception 0x80000003 at address 0x88f9f9df > The key is in `gnus-summary-line-format=B4 "%-70,70s". > The crash will happen when the summary line is wider=20 > than the emacs frame AND the subject has korean=20 > characters. Thank you for the report. This bug was already fixed in the CVS HEAD by the attached patch. Eduardo, could you please try the attached patch? --- Ken'ichi HANDA handa@m17n.org 2002-01-02 Richard M. Stallman [...] * editfns.c (Fformat): Update thissize from field_width based on the actual width, in the string case. Index: editfns.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/emacs/src/editfns.c,v retrieving revision 1.324 retrieving revision 1.325 diff -u -c -r1.324 -r1.325 cvs server: conflicting specifications of output style *** editfns.c 18 Dec 2001 02:15:53 -0000 1.324 --- editfns.c 2 Jan 2002 19:56:50 -0000 1.325 *************** *** 3217,3222 **** --- 3217,3223 ---- if (*format++ =3D=3D '%') { int thissize =3D 0; + int actual_width =3D 0; unsigned char *this_format_start =3D format - 1; int field_width, precision; =20 *************** *** 3297,3302 **** --- 3298,3304 ---- if (*format !=3D 's' && *format !=3D 'S') error ("Format specifier doesn't match argument type"); thissize =3D CONVERTED_BYTE_SIZE (multibyte, args[n]); + actual_width =3D lisp_string_width (args[n], -1, NULL, NULL); } /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */ else if (INTEGERP (args[n]) && *format !=3D 's') *************** *** 3350,3356 **** goto string; } =20 ! thissize =3D max (field_width, thissize); total +=3D thissize + 4; } =20 --- 3352,3358 ---- goto string; } =20 ! thissize +=3D max (0, field_width - actual_width); total +=3D thissize + 4; } =20