Bug 302181 - segfault if columns <= 4
segfault if columns <= 4
Product: Fedora
Classification: Fedora
Component: slang (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-09-23 09:33 EDT by Sami Farin
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-25 11:46:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sami Farin 2007-09-23 09:33:33 EDT
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:

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

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
#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
#7  0x00007fd61808c1c2 in _pSLsys_getkey () at
#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 11:29:14 EDT
It's a slang bug.
Comment 2 Miroslav Lichvar 2007-09-25 11:46:17 EDT
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.