all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: Gnus crash
Date: Fri, 17 Jan 2003 11:20:59 +0900 (JST)	[thread overview]
Message-ID: <200301170220.LAA12538@etlken.m17n.org> (raw)
In-Reply-To: <usmvzsjbm.fsf@terra.es> (emufer@terra.es)

In article <usmvzsjbm.fsf@terra.es>, "Eduardo =?iso-8859-1?q?Mu=F1oz?=" <emufer@terra.es> writes:
> A korean spam message manged to crash Emacs while 
> using Gnus. I can reproduce the crash with only two 
> 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á Emacs crashes

> Emacs Abort Dialog
> Select Abor/Retry/Ignore 

> ->  Retry 

> Exception 0x80000003 at address 0x88f9f9df

> The key is in `gnus-summary-line-format´ "%-70,70s".
> The crash will happen when the summary line is wider 
> than the emacs frame AND the subject has korean 
> 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  <rms@gnu.org>
[...]
	* editfns.c (Fformat): Update thissize from field_width
	based on the actual width, in the string case.

Index: editfns.c
===================================================================
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++ == '%')
        {
  	int thissize = 0;
+ 	int actual_width = 0;
  	unsigned char *this_format_start = format - 1;
  	int field_width, precision;
  
***************
*** 3297,3302 ****
--- 3298,3304 ----
  	    if (*format != 's' && *format != 'S')
  	      error ("Format specifier doesn't match argument type");
  	    thissize = CONVERTED_BYTE_SIZE (multibyte, args[n]);
+ 	    actual_width = 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 != 's')
***************
*** 3350,3356 ****
  	    goto string;
  	  }
  
! 	thissize = max (field_width, thissize);
  	total += thissize + 4;
        }
  
--- 3352,3358 ----
  	    goto string;
  	  }
  
! 	thissize += max (0, field_width - actual_width);
  	total += thissize + 4;
        }
  

  reply	other threads:[~2003-01-17  2:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-11 17:11 Gnus crash Eduardo Muñoz
2003-01-17  2:20 ` Kenichi Handa [this message]
2003-01-17 21:45   ` Eduardo Muñoz
2003-01-20  0:19     ` Kenichi Handa
2003-01-20 21:27       ` Eduardo Muñoz
2003-01-21 11:41         ` Kenichi Handa
2003-01-22  9:59         ` Richard Stallman
     [not found]   ` <mailman.759.1043229932.21513.bug-gnu-emacs@gnu.org>
2003-01-23  8:37     ` Lee Sau Dan
2003-01-24  5:43       ` Richard Stallman
2003-01-17  2:27 ` Kenichi Handa
2003-01-17  4:58   ` RC: XML recognition (Re: Gnus crash) Karl Eichwalder
2003-01-17 19:09     ` Jason Rumney
2003-01-17 21:11       ` Kim F. Storm
2003-01-17 20:37         ` Karl Eichwalder
2003-01-18  0:46     ` Richard Stallman
2003-01-18  5:27       ` Karl Eichwalder
2003-01-20  0:50         ` Richard Stallman
2003-01-18  0:46   ` Gnus crash Richard Stallman
2003-01-20  0:25     ` Kenichi Handa
2003-01-20  9:18       ` Francesco Potorti`
2003-01-20 10:41         ` Kenichi Handa
2003-01-20 16:45       ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2003-01-13 16:48 ShengHuo ZHU
     [not found] <mailman.220.1042476624.21513.bug-gnu-emacs@gnu.org>
2003-01-13 17:34 ` Eduardo Muñoz
2018-12-25  9:41 Window change functions martin rudalics
2018-12-25 20:13 ` Gnus crash (was: Window change functions) Juri Linkov
2018-12-25 20:39   ` Gnus crash Stefan Monnier
2018-12-26  9:19     ` Paul Eggert
2018-12-26 22:22       ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301170220.LAA12538@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.