bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus crash


From: Kenichi Handa
Subject: Re: Gnus crash
Date: Fri, 17 Jan 2003 11:20:59 +0900 (JST)
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)

In article <address@hidden>, "Eduardo =?iso-8859-1?q?Mu=F1oz?=" 
<address@hidden> 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
address@hidden

2002-01-02  Richard M. Stallman  <address@hidden>
[...]
        * 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 via email to

[Prev in Thread] Current Thread [Next in Thread]