mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
924a84a3b4
When reading ssh_config with matching host entry mc do bad pointer arithmetic. Fix it! (Also move offsetof values into struct to reduce human mistakes.) ==18689==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000004910 at pc 0x000000641a8b bp 0x7ffca4ab65e0 sp 0x7ffca4ab65d8 WRITE of size 8 at 0x604000004910 thread T0 #0 0x641a8a in sftpfs_fill_config_entity_from_string /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:169:30 #1 0x6413cf in sftpfs_fill_config_entity_from_config /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:271:13 #2 0x640b73 in sftpfs_get_config_entity /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:310:14 #3 0x64067d in sftpfs_fill_connection_data_from_config /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:354:21 #4 0x61ef95 in sftpfs_cb_open_connection /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/vfs_subclass.c:111:5 #5 0x7f1340c31beb in vfs_s_get_path /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:1139:18 #6 0x7f1340c3685c in vfs_s_inode_from_path /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:380:9 #7 0x7f1340c34807 in vfs_s_opendir /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:409:11 #8 0x7f1340c34ce8 in vfs_s_chdir /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:476:12 #9 0x7f1340c3a29f in mc_chdir /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/interface.c:687:14 #10 0x530f64 in _do_panel_cd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/panel.c:3250:9 #11 0x530e4e in do_panel_cd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/panel.c:4627:9 #12 0x532d34 in do_cd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/panel.c:5027:11 #13 0x50b64b in do_cd_command /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/command.c:445:14 #14 0x50c516 in enter /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/command.c:265:9 #15 0x52704c in midnight_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1473:17 #16 0x7f1340c4c761 in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:505:15 #17 0x7f1340c4cc32 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9 #18 0x7f1340c4c935 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5 #19 0x52654d in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1757:9 #20 0x4f7d8a in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:401:21 #21 0x7f133f1b8953 in __libc_start_main (/lib64/libc.so.6+0x20953) #22 0x427368 in _start (/tmp/portage/app-misc/mc-9999/work/mc-9999/src/.libs/mc+0x427368) Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru> |
||
---|---|---|
contrib | ||
doc | ||
lib | ||
m4.include | ||
maint | ||
misc | ||
po | ||
src | ||
tests | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
acinclude.m4 | ||
AUTHORS | ||
autogen.sh | ||
build-glib2.sh | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
INSTALL | ||
Makefile.am | ||
NEWS | ||
README |
Contents -------- Introduction Dependencies Features Mini-documentation Where to get more information Reporting problems Introduction ------------ GNU Midnight Commander (also referred to as MC) is a user shell with text-mode full-screen interface. It can be run on the OS console, in xterm and other terminal emulators. GNU Midnight Commander allows you to manage files while making most of you screen and giving you a clear representation of the filesystem, yet it's simple enough to be run over a telnet or ssh session. GNU Midnight Commander is released under the GNU General Public License version 3 or any later version. A copy of the file is included with this distribution package. Dependencies ------------ Please read the file INSTALL for installation instructions and full list of dependencies. Features -------- GNU Midnight Commander was conceived as a free clone of John Socha's Norton Commander (TM). It also takes the best from more recent software with similar interfaces. GNU Midnight Commander comes with mouse support on xterm and optionally on the Linux console. Some features are specific to the POSIX environment MC runs on, some are familiar to the users of similar software for other operating systems. The features include: * Built in Virtual File System: manipulate remote file systems through the FTP and SMB protocols or over secure shell, browse contents of tar, ar, rpm, zip, cpio, lha and rar archives just like local files. * Almost all operations work with the virtual file system, enabling you to do complex tasks, like viewing files in archives on an FTP server. * Mouse support on most terminal emulators for X Window System as well as on the Linux console. * Learn Keys: GNU Midnight Commander may be configured at run time to support any kind of input keys for a given terminal, making its operation possible even on most weird terminals. * Text and hex editors are available for you to use (hex editor is a part of the viewer). * Hotlist allows you to keep a list of common visited locations, including remote sites and directories inside archives. * Command completion: By pressing Alt-Tab in any place where a filename or an executable are expected, GNU Midnight Commander will complete the name for you. If you press Alt-Tab for the second time, you get a list box with all possible completions. * Subshell support: Run your commands by a real shell interpreter. GNU Midnight Commander interacts with bash, tcsh and zsh to provide you with all of the facilities available in your preferred shell. * Find file command can search for the file contents. * Background operations allow you to copy or move files from any virtual file system while you do other tasks (i.e., you can do background FTP copies). * FTP proxy is supported. * Linux file recovery: If you are using Linux, you can recover deleted files from an ext2 or ext3 partition with the undelete file system. This is a low level file recovery function that can recover files deleted by any program on Linux. * External panelization: You can run any arbitrary external command and GNU Midnight Commander will display the output generated as a file listing that can be manipulated as a regular directory. * Emacs-like key bindings are used in all widgets. * Context dependent actions (open, view, edit) are available. * The built-in file viewer, together with the context dependent actions is used to format man pages on the fly, coloring mail messages and more. * The built-in editor supports syntax highlighting and external actions, such as spell checking and formatting. Mini-documentation ------------------ These are hints for the text mode edition: * Use the F-Keys for invoking the commands in the function key bar. If your terminal doesn't support F-keys, you can use the <ESC digit> sequence to invoke the corresponding F-digit key. * Tab changes the current panel. * All input lines have emacs-like key-bindings (command history is accessed through the M-p and M-n keys). * The panels accept C-n, C-p for browsing the panel (like in Emacs). * M-Enter copies the currently selected file name to the input line. * M-Tab completes the current word (or tries to). * The Virtual File System is a cute addition to the project, you may browse in tar and compressed tar files as well as browsing remote machines with the fish file system. * Please read the manual page. You can access the whole documentation online with the F1 key, although it's not as nice as the groff printed manual page :-) Where to get more information ----------------------------- There is a webpage for GNU Midnight Commander at http://www.midnight-commander.org/ This page also has current information about mailing lists and some useful advices how to report bugs. You can download the latest version of GNU Midnight Commander from http://www.midnight-commander.org/downloads/ Reporting problems ------------------ You can report bug on our site, please read http://midnight-commander.org/wiki/defectReports Also you can use mc mailing lists to discuss problems. There are two mailing lists, mc@gnome.org and mc-devel@gnome.org. Use mc-devel@gnome.org if you are prepared for a more technical discussion with the developers of the package, otherwise use mc@gnome.org. Please don't sent HTML e-mail to either of those mailing lists. Include the output of "mc --version", the operating system and the distribution (if applicable) you are using, the compiler and the configure flags used to compile the program (if you know them). If the program crashed and produced a core dump, please provide a stack trace of the program. You can do this by running gdb like this: gdb mc core (gdb) where