Bug 302181 - segfault if columns <= 4
Summary: segfault if columns <= 4
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: slang
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-23 13:33 UTC by Sami Farin
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-09-25 15:46:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sami Farin 2007-09-23 13:33:33 UTC
Description of problem:
in slrn.c there is code:
SLsmg_Scroll_Hash_Border = 5;
which results into segfault if number of columns goes below 5.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. resize xterm your slrn is running in to under 5 columns
2.
3.
  
Actual results:
segfault

Expected results:
something less evil

I know nobody's xterm is 4 chars wide, but accidents can happen while resizing
or moving xterm.

Additional info:

(gdb) bt
#0  0x00007fd6180c1350 in _pSLstring_hash (
    s=0x7fd619b7d000 <Address 0x7fd619b7d000 out of bounds>, 
    smax=0x7ff219b317e0 <Address 0x7ff219b317e0 out of bounds>)
    at /rh/BUILD/slang-2.1.2/src/slstring.c:120
#1  0x00007fd6180b76e8 in compute_hash (c=0x7fd619b31888, n=4)
    at /rh/BUILD/slang-2.1.2/src/slsmg.c:1006
#2  0x00007fd6180b8dc6 in init_smg () at /rh/BUILD/slang-2.1.2/src/slsmg.c:1543
#3  0x00007fd6180b8f3a in SLsmg_reinit_smg () at
/rh/BUILD/slang-2.1.2/src/slsmg.c:1594
#4  0x00007fd618075bcb in slrn_set_screen_size (sig=1) at slrn.c:636
#5  0x00007fd618075c4d in slrn_handle_interrupts () at slrn.c:681
#6  0x00007fd61808c108 in handle_interrupt () at
/rh/BUILD/slang-2.1.2/src/slutty.c:529
#7  0x00007fd61808c1c2 in _pSLsys_getkey () at
/rh/BUILD/slang-2.1.2/src/slutty.c:565
#8  0x00007fd6180a695a in SLang_getkey () at /rh/BUILD/slang-2.1.2/src/slgetkey.c:51
#9  0x00007fd618077773 in slrn_getkey () at slrn.c:1642
#10 0x00007fd6180a7608 in SLang_do_key (kml=0x7fd619b2b760, 
    getkey=0x7fd6180776a3 <slrn_getkey>) at /rh/BUILD/slang-2.1.2/src/slkeymap.c:453
#11 0x00007fd618077882 in slrn_do_keymap_key (map=0x7fd619b2b760) at slrn.c:1674
#12 0x00007fd618077b8f in main (argc=6, argv=0x7fffbd9bbba8) at slrn.c:1809

Comment 1 Miroslav Lichvar 2007-09-24 15:29:14 UTC
It's a slang bug.

Comment 2 Miroslav Lichvar 2007-09-25 15:46:17 UTC
Fixed in slang-2.1.2-2.fc8. Thanks for the report.


Note You need to log in before you can comment on or make changes to this bug.