Ticket #4482 (closed defect: wontfix)

Opened 16 months ago

Last modified 16 months ago

Possible FPE in tt_sprintf()

Reported by: ruijie Owned by:
Priority: major Milestone:
Component: mc-tty Version: 4.8.27
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

What version of Midnight Commander is used?

  1. output of mc -V:
GNU Midnight Commander 4.8.27
Built with GLib 2.68.4
Built with S-Lang 2.3.2 with terminfo database
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
  1. Output of mc -F:
Home directory: /home/ruijie
Profile root directory: /home/ruijie

[System data]
    Config directory: /etc/mc/
    Data directory:   /usr/share/mc/
    File extension handlers: /usr/lib/mc/ext.d/
    VFS plugins and scripts: /usr/lib/mc/
	extfs.d:        /usr/lib/mc/extfs.d/
	fish:           /usr/lib/mc/fish/

[User data]
    Config directory: /home/ruijie/.config/mc/
    Data directory:   /home/ruijie/.local/share/mc/
	skins:          /home/ruijie/.local/share/mc/skins/
	extfs.d:        /home/ruijie/.local/share/mc/extfs.d/
	fish:           /home/ruijie/.local/share/mc/fish/
	mcedit macros:  /home/ruijie/.local/share/mc/mc.macros
	mcedit external macros: /home/ruijie/.local/share/mc/mcedit/macros.d/macro.*
    Cache directory:  /home/ruijie/.cache/mc/
  1. Output of mc --configure-options:
 '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'AWK=awk' 'X11_WWW=x-www-browser' '--libexecdir=/usr/lib' '--with-x' '--with-screen=slang' '--disable-rpath' '--disable-static' '--disable-silent-rules' '--enable-aspell' '--enable-vfs-sftp' '--enable-vfs-undelfs' '--enable-tests' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/mc-EOIzsU/mc-4.8.27=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

What steps will reproduce the problem?

  1. Copy the attached file to ~/.terminfo/x/
  2. Run mc

What is the expected output?

No fault

What do you see instead?

Program received signal SIGFPE, Arithmetic exception.
0x00007ffde904e6fe in tt_sprintf (buf=0x7fffffffdab0 "{1000}/\203\065\065.2X/0.2X\033\\", buflen=1024, fmt=0x5555556ba925 "%2.2X\033\\", x=0, y=0) at ./src/sldisply.c:644
644	./src/sldisply.c: No such file or directory.
(gdb) bt
#0  0x00007ffde904e6fe in tt_sprintf (buf=0x7fffffffdab0 "{1000}/\203\065\065.2X/0.2X\033\\", buflen=1024, fmt=0x5555556ba925 "%2.2X\033\\", x=0, y=0) at ./src/sldisply.c:644
#1  0x00007ffde904ec4e in tt_printf (fmt=0x5555556ba91d "{1000}%/%2.2X\033\\", x=0, y=0) at ./src/sldisply.c:759
#2  0x00007ffde9050c3c in write_attributes (fgbg=1792) at ./src/sldisply.c:1708
#3  0x00007ffde9050ccf in SLtt_reverse_video (color=0) at ./src/sldisply.c:1737
#4  0x00007ffde9050ce9 in SLtt_normal_video () at ./src/sldisply.c:1742
#5  0x00007ffde9053c47 in SLtt_reset_video () at ./src/sldisply.c:3176
#6  0x00007ffde9095a22 in SLsmg_reset_smg () at ./src/slsmg.c:1676
#7  0x00007ffde909593d in init_smg_for_mode (mode=1) at ./src/slsmg.c:1625
#8  0x00007ffde90959a4 in SLsmg_init_smg () at ./src/slsmg.c:1645
#9  0x0000555555573792 in ?? ()
#10 0x00007ffde9429d90 in __libc_start_call_main (main=main@entry=0x555555571450, argc=argc@entry=1, argv=argv@entry=0x7fffffffe2c8)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#11 0x00007ffde9429e40 in __libc_start_main_impl (main=0x555555571450, argc=1, argv=0x7fffffffe2c8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe2b8) at ../csu/libc-start.c:392
#12 0x0000555555575135 in ?? ()

Attachments

xterm-256color (3.9 KB) - added by ruijie 16 months ago.

Change History

Changed 16 months ago by ruijie

comment:1 Changed 16 months ago by andrew_b

tt_sprintf() is a function of S-Lang library.
Please send a bugreport to S-Lang: http://www.jedsoft.org/slang/mailinglists.html

comment:2 Changed 16 months ago by andrew_b

  • Component changed from mc-core to mc-tty

comment:3 Changed 16 months ago by andrew_b

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.