Enrico has accidentially removed the slang1.x support in mc-4.6 branch as
this is a structural change which clearly doesn't belong into mc-4.6.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
* 241_buffer_overflow:
Resolve some issues in mhl Rollang Illig pointed us to:
Added enhancements from Sergei which he attached to #241.
Call va_end after the iteration as we need to free the list again.
Fixing a theoretical buffer overflow which was reported by Roland Illig
Conflicts:
mhl/types.h
Signed-off-by: Patrick Winnertz <winnie@debian.org>
- isspace & toupper needs an unsigned char as arg
- collision with compiler namespace __X
- resolved some typos
Signed-off-by: Patrick Winnertz <winnie@debian.org>
if the concat function was called with more than 32 parameters there will be
a buffer overflow. This will add a small check to ensure that we concat only 32 parameters.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
./configure --enable-samba && make
../vfs/libvfs-mc.a(smbfs.o): In function `smbfs_get_path':
/home/andrew/work.c/mc/mc.master/vfs/smbfs.c:1214: undefined reference to `mhl_str_dir_plus_file'
collect2: ld returned 1 exit status
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
./configure --enable-charset && make
charsets.c: In function 'load_codepages_list':
charsets.c:51: warning: implicit declaration of function 'mhl_str_dir_plus_file'
charsets.c:51: warning: assignment makes pointer from integer without a cast
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
<winnie> ls -lQ /tmp/test
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:05 "a"
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:04 " test\"hallo"
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:04 " test$hallo"
<winnie> and then cat /tmp/test/\ and ESC-tab in subshell...
unescape/escape sequences in command completion (it also solves
completiont of weirdweird escapy commands like ./<escapy-cmd><complete>, like:
$ ls -lQ
-rwxr-xr-x 1 slyfox slyfox 2037 Jan 15 21:18 " 'asd&&\"->build-glib1.sh"
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
* mc-4.6:
replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()
fixed out-of-tree-builds
Updated the NEWS file for 4.6.2 and added the bugnumbers behind the items in the list.
Update for OpenOffice and StarOffice viewer.
changelog: added entry for python syntax
syntax: python: keywords update (patch by NNemec) fixes#216
AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
po/ru.po: In russian translation, there are some hotkey conficts in menu.
ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
Now a trailing slash will only be added in copy & move dialogs if the path itselfs
copy/move dialog: add trailing '/' to default destination path (fix#181)
fixed comments to /* ... */
Not only comment it out but removing it
Removed unneeded var to make build process a bit cleaner
Add code snipplet by il.smind which should fix issues with putty and
Conflicts:
ChangeLog
mhl/string.h
src/command.c
src/complete.c
src/file.c
src/util.c
valgrind detected an error in completion path:
==2962== Source and destination overlap in strcpy(0x459F068, 0x459F06A)
==2962== at 0x4026056: strcpy (mc_replace_strmem.c:268)
==2962== by 0x808F70B: canonicalize_pathname (string3.h:106)
==2962== by 0x805ECBA: filename_completion_function (complete.c:125)
==2962== by 0x805FB35: command_completion_function (complete.c:448)
==2962== by 0x805EA34: completion_matches (complete.c:552)
==2962== by 0x8060454: complete (complete.c:735)
==2962== by 0x809AAC4: handle_char (widget.c:1545)
==2962== by 0x807867E: midnight_callback (dialog.h:201)
==2962== by 0x8061B27: dlg_process_event (dialog.c:664)
==2962== by 0x8061ECE: run_dlg (dialog.c:786)
==2962== by 0x807996C: main (main.c:1674)
Snippet of man strcpy:
DESCRIPTION
The strcpy() function copies the string pointed to by src, including the terminating
null byte ('\0'), to the buffer pointed to by dest. ___The strings may not overlap___,
and the destination string dest must be large enough to receive the copy.
We used strcpy to move data chunk in memory: "./foo" -> "foo", etc.
This patch introduces mhl_strmove and fixed canonicalize_pathname.
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
This is a cherry-pick of 1150007bff from master.
It's unclear for me why Milestone 4.6.2 was set but this change wasn't merged into mc-4.6.
Conflicts:
po/ChangeLog
Problem:
When user tried to copy/move file (F5/F6) - he could run into trouble if
destination directory is removed (it can be removed by user from another mc session).
Operation is performed and(!) file is renamed.
So when when user issues 'cp /tmp/a.file /tmp/b' - he gets not expected /tmp/b/a.file,
but /tmp.b !
Solution:
Add trailing space for destination directory for non-local copy/move(F5/F6) operations.
So operation, given above will take form: 'cp /tmp/a.file /tmp/b/' disambiguating b
meaning.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>