Bug#573447: Segfault when terminal is > 129 lines

2010-03-19 Thread xavier . hienne
The number of rows is stored in a signed char, hence the 128 rows limit.
The patch below should fix this.

Xavier


diff -ur mg-20070918.old/def.h mg-20070918.new/def.h
--- mg-20070918.old/def.h   2007-05-29 20:47:47.0 +0200
+++ mg-20070918.new/def.h   2010-03-19 20:51:10.0 +0100
@@ -202,9 +202,9 @@
struct line *w_markp;   /* Line containing "mark"   */
int  w_doto;/* Byte offset for "."  */
int  w_marko;   /* Byte offset for "mark"   */
-   char w_toprow;  /* Origin 0 top row of window   */
-   char w_ntrows;  /* # of rows of text in window  */
-   char w_frame;   /* #lines to reframe by.*/
+   int  w_toprow;  /* Origin 0 top row of window   */
+   int  w_ntrows;  /* # of rows of text in window  */
+   int  w_frame;   /* #lines to reframe by.*/
char w_flag;/* Flags.   */
struct line *w_wrapline;
int  w_dotline; /* current line number of dot   */



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#573447: Segfault when terminal is > 129 lines

2010-03-11 Thread Cyril Bouthors
Package: mg
Version: 20070918-2
Severity: normal

mg segfaults when the terminal is bigger than 129 lines.

Here's the procedure to reproduce :

resize your terminal in order to have more than 129 lines (reduce the
font size if needed) then:
$ echo $LINES
130
$ mg
Segmentation fault
$ 

With anything bellow or equal to 129, it works.

It often happens when using huge screens and full screen terminals.

The same bug is reproducible with versions 20070918-2, 20080610-1 and
20090107-3.

Regards,

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-19-vserver (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mg depends on:
ii  libc6 2.7-18lenny2   GNU C Library: Shared libraries
ii  libncurses5   5.7+20081213-1 shared libraries for terminal hand

mg recommends no packages.

mg suggests no packages.

-- no debconf information
-- 
 ,''`.
: :' :  Cyril Bouthors
`. `' Debian.org
  `-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org