[Commits] [SCM] claws branch, master, updated. 3.17.3-12-g35bfe29

ticho at claws-mail.org ticho at claws-mail.org
Sat Dec 29 15:54:28 CET 2018


The branch, master has been updated
       via  35bfe2979688008d12691f564ced7e5531e1d57b (commit)
      from  6a1521ae37726f05cb3ddeb1cee4a5d56eb00e06 (commit)

Summary of changes:
 src/gtk/w32_filesel.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 35bfe2979688008d12691f564ced7e5531e1d57b
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Dec 29 15:51:35 2018 +0100

    Fix incorrect pointer arithmetic in w32_filesel.c
    
    This caused the lpstrFilter parameter to be set up
    incorrectly, and a buffer overflow.

diff --git a/src/gtk/w32_filesel.c b/src/gtk/w32_filesel.c
index 1aa6902..3a37b7b 100644
--- a/src/gtk/w32_filesel.c
+++ b/src/gtk/w32_filesel.c
@@ -169,8 +169,7 @@ static const gboolean _file_open_dialog(const gchar *path, const gchar *title,
 		sz = sizeof(gunichar2);
 		win_filter16 = g_malloc0(conv_items*sz*2 + sz*3);
 		memcpy(win_filter16, filter16, conv_items*sz);
-		memcpy(win_filter16 + conv_items*sz + sz, filter16, conv_items*sz);
-		g_free(filter16);
+		memcpy(win_filter16 + conv_items + 1, filter16, conv_items*sz);
 
 		if (error != NULL) {
 			debug_print("dialog title '%s' conversion to UTF-16 failed\n", title);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list