diff -Nru macopix-1.7.4/debian/changelog macopix-1.7.4/debian/changelog --- macopix-1.7.4/debian/changelog 2014-04-27 16:09:57.000000000 +0000 +++ macopix-1.7.4/debian/changelog 2016-02-18 19:49:10.000000000 +0000 @@ -1,3 +1,15 @@ +macopix (1.7.4-6) unstable; urgency=low + + * Add debian/patches/005_fix_clang_FTBFS_Wreturn-type.patch: + - Fix FTBFS for clang (Closes: #742141) + - Thanks to Nicolas Sévelin-Radiguet + * Add debian/patches/006_CVE-2015-8614.patch: + - Sync code from the claws-mail-3.13.2 + - Fix CVE-2015-8614 + - Thanks to Ben Hutchings + + -- Ying-Chun Liu (PaulLiu) Fri, 19 Feb 2016 03:48:20 +0800 + macopix (1.7.4-5) unstable; urgency=low * Bump Standards-Version to 3.9.5: Nothing needs to be changed diff -Nru macopix-1.7.4/debian/patches/005_fix_clang_FTBFS_Wreturn-type.patch macopix-1.7.4/debian/patches/005_fix_clang_FTBFS_Wreturn-type.patch --- macopix-1.7.4/debian/patches/005_fix_clang_FTBFS_Wreturn-type.patch 1970-01-01 00:00:00.000000000 +0000 +++ macopix-1.7.4/debian/patches/005_fix_clang_FTBFS_Wreturn-type.patch 2016-02-18 19:43:05.000000000 +0000 @@ -0,0 +1,74 @@ +Description: fix FTBFS with clang instead of gcc +Author: Nicolas Sévelin-Radiguet +Last-Update: 2014-03-19 + +Index: macopix-1.7.4/src/callbacks.c +=================================================================== +--- macopix-1.7.4.orig/src/callbacks.c ++++ macopix-1.7.4/src/callbacks.c +@@ -538,7 +538,7 @@ int MoveToFocus(typMascot *mascot, gbool + if((win_bar_size==0)&&(mascot->no_capbar)){ + // for windows w/o title bar + flag_homepos=mascot->homepos_nb; +- if(flag_homepos==HOMEPOS_NEVER) return; ++ if(flag_homepos==HOMEPOS_NEVER) return 0; + } + break; + } +Index: macopix-1.7.4/src/gui.c +=================================================================== +--- macopix-1.7.4.orig/src/gui.c ++++ macopix-1.7.4/src/gui.c +@@ -4557,7 +4557,7 @@ gchar* create_nkr_change_image_dialog + gchar *dest_file; + + if(flagChildDialog){ +- return; ++ return 0; + } + else{ + flagChildDialog=TRUE; +@@ -4637,7 +4637,7 @@ gchar* create_nkr_change_image_dialog + char win_title[64]; + + if(flagChildDialog){ +- return; ++ return 0; + } + else{ + flagChildDialog=TRUE; +Index: macopix-1.7.4/src/mail.c +=================================================================== +--- macopix-1.7.4.orig/src/mail.c ++++ macopix-1.7.4/src/mail.c +@@ -1422,7 +1422,7 @@ gchar * fs_get_procmail(typMascot *mas + froms=strbuf(NULL); + + if((fp=fopen(mascot->mail.file,"r"))==NULL){ +- return; ++ return -1; + } + + while(!feof(fp)){ +@@ -1545,7 +1545,7 @@ gchar * fs_get_qmail(typMascot *mascot){ + froms=strbuf(NULL); + + if ((dp=opendir(mascot->mail.file))==NULL){ +- return; ++ return -1; + } + + +Index: macopix-1.7.4/src/sockmsg.c +=================================================================== +--- macopix-1.7.4.orig/src/sockmsg.c ++++ macopix-1.7.4/src/sockmsg.c +@@ -276,7 +276,7 @@ static gboolean io_callback_sv(GIOChanne + + fd_close(fd); + +- if(readsize<4) return; ++ if(readsize<4) return -1; + + strncpy(tmp,buf,2); + mode=atoi(tmp); diff -Nru macopix-1.7.4/debian/patches/006_CVE-2015-8614.patch macopix-1.7.4/debian/patches/006_CVE-2015-8614.patch --- macopix-1.7.4/debian/patches/006_CVE-2015-8614.patch 1970-01-01 00:00:00.000000000 +0000 +++ macopix-1.7.4/debian/patches/006_CVE-2015-8614.patch 2016-02-18 19:45:21.000000000 +0000 @@ -0,0 +1,135 @@ +Description: Fix CVE-2015-8614 + I tried to move the code from latest claws-mail upstream which fixes + the bug already. +Author: Ying-Chun Liu (PaulLiu) +Last-Update: 2016-02-14 +Index: macopix-1.7.4/src/codeconv.c +=================================================================== +--- macopix-1.7.4.orig/src/codeconv.c ++++ macopix-1.7.4/src/codeconv.c +@@ -128,10 +128,14 @@ typedef enum + void conv_jistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf) + { + const guchar *in = inbuf; +- guchar *out = outbuf; ++ gchar *out = outbuf; + JISState state = JIS_ASCII; + +- while (*in != '\0') { ++ /* ++ * Loop outputs up to 3 bytes in each pass (aux kanji) and we ++ * need 1 byte to terminate the output ++ */ ++ while (*in != '\0' && (out - outbuf) < outlen - 4) { + if (*in == ESC) { + in++; + if (*in == '$') { +@@ -192,6 +196,7 @@ void conv_jistoeuc(gchar *outbuf, gint o + } + + *out = '\0'; ++ return ; + } + + #define JIS_HWDAKUTEN 0x5e +@@ -263,10 +268,15 @@ static gint conv_jis_hantozen(guchar *ou + void conv_euctojis(gchar *outbuf, gint outlen, const gchar *inbuf) + { + const guchar *in = inbuf; +- guchar *out = outbuf; ++ gchar *out = outbuf; + JISState state = JIS_ASCII; + +- while (*in != '\0') { ++ /* ++ * Loop outputs up to 6 bytes in each pass (aux shift + aux ++ * kanji) and we need up to 4 bytes to terminate the output ++ * (ASCII shift + null) ++ */ ++ while (*in != '\0' && (out - outbuf) < outlen - 10) { + if (isascii(*in)) { + K_OUT(); + *out++ = *in++; +@@ -286,26 +296,32 @@ void conv_euctojis(gchar *outbuf, gint o + } + } else if (iseuchwkana1(*in)) { + if (iseuchwkana2(*(in + 1))) { +- guchar jis_ch[2]; +- gint len; +- +- if (iseuchwkana1(*(in + 2)) && +- iseuchwkana2(*(in + 3))) +- len = conv_jis_hantozen +- (jis_ch, +- *(in + 1), *(in + 3)); +- else +- len = conv_jis_hantozen +- (jis_ch, +- *(in + 1), '\0'); +- if (len == 0) +- in += 2; +- else { +- K_IN(); +- in += len * 2; +- *out++ = jis_ch[0]; +- *out++ = jis_ch[1]; +- } ++ if (0) { ++ HW_IN(); ++ in++; ++ *out++ = *in++ & 0x7f; ++ } else { ++ guchar jis_ch[2]; ++ gint len; ++ ++ if (iseuchwkana1(*(in + 2)) && ++ iseuchwkana2(*(in + 3))) ++ len = conv_jis_hantozen ++ (jis_ch, ++ *(in + 1), *(in + 3)); ++ else ++ len = conv_jis_hantozen ++ (jis_ch, ++ *(in + 1), '\0'); ++ if (len == 0) ++ in += 2; ++ else { ++ K_IN(); ++ in += len * 2; ++ *out++ = jis_ch[0]; ++ *out++ = jis_ch[1]; ++ } ++ } + } else { + K_OUT(); + in++; +@@ -340,14 +356,19 @@ void conv_euctojis(gchar *outbuf, gint o + + K_OUT(); + *out = '\0'; ++ return ; + } + + void conv_sjistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf) + { + const guchar *in = inbuf; +- guchar *out = outbuf; ++ gchar *out = outbuf; + +- while (*in != '\0') { ++ /* ++ * Loop outputs up to 2 bytes in each pass and we need 1 byte ++ * to terminate the output ++ */ ++ while (*in != '\0' && (out - outbuf) < outlen - 3) { + if (isascii(*in)) { + *out++ = *in++; + } else if (issjiskanji1(*in)) { +@@ -386,6 +407,7 @@ void conv_sjistoeuc(gchar *outbuf, gint + } + + *out = '\0'; ++ return ; + } + + void conv_anytoeuc(gchar *outbuf, gint outlen, const gchar *inbuf) diff -Nru macopix-1.7.4/debian/patches/series macopix-1.7.4/debian/patches/series --- macopix-1.7.4/debian/patches/series 2012-05-18 20:04:56.000000000 +0000 +++ macopix-1.7.4/debian/patches/series 2016-02-18 19:42:51.000000000 +0000 @@ -2,3 +2,5 @@ 002_patch_man_page.patch 003_fix_implicit_pointer_function_main.h.patch 004_dont_link_to_gcrypt.patch +005_fix_clang_FTBFS_Wreturn-type.patch +006_CVE-2015-8614.patch