* commit 'origin/revert_mhl_to_glib_mc-4.6':
fixed mismerge: completion stuff
mismerge fix: g_concat -> g_strconcat
header guard fix
Remove some of the SHELL_ESCAPE_STR Stuff...
Revert "introduced new type SHELL_ESCAPED_STR for more type safety"
Last bunch of reverts and removal of mhl/*
fixed canonicalize_pathname() breakage: fixed str_move() function (memmove semantics) again
Revert some functions (mhl_mem_free to g_free, etc)
Revert "replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()"
Revert "mhl: mhl_shell_unescape_buf(): fixed memory array OOB."
Revert "build fix: added missing declaration of mhl_dir_plus_file (reported by andrew_b)"
Revert "cleanup: mhl_str_dir_plus_file(): int -> size_t (suggested by Andrew Borodin)"
Revert "fixed #240"
Revert "Fixing a theoretical buffer overflow which was reported by Roland Illig"
Revert "Call va_end after the iteration as we need to free the list again."
Revert "Added enhancements from Sergei which he attached to #241."
Revert "Resolve some issues in mhl Rollang Illig pointed us to:"
Conflicts:
ChangeLog
and add shell_(un)escape again
This patch reintroduces fix firstly appeared in (and recently broken by mhl revert)
> commit e48cb7c89f
> Author: Sergei Trofimovich <st@anti-virus.by>
> Date: Fri Jan 30 09:31:28 2009 +0200
>
> mhl: added mhl_strmove() function (memmove semantics)
...
> 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.
Conflicts:
src/util.h
Signed-off-by: Patrick Winnertz <winnie@debian.org>
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>