.
OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=91
This commit is contained in:
parent
830dd05dca
commit
81a8190f4d
@ -1,8 +1,8 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 18 12:54:39 UTC 2013 - werner@suse.de
|
Thu Apr 18 12:54:39 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
- Add widechar.sidebar.dif: bnc#813498 - mutt crashes in fgetwc in
|
- Add widechar.sidebar.dif as workaround: bnc#813498 - mutt crashes
|
||||||
text_enriched_handler
|
in fgetwc in text_enriched_handler
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 14 09:11:05 UTC 2013 - werner@suse.de
|
Mon Jan 14 09:11:05 UTC 2013 - werner@suse.de
|
||||||
|
38
mutt.spec
38
mutt.spec
@ -133,12 +133,42 @@ cp %{S:2} .
|
|||||||
%if 0%{?suse_version} > 1100
|
%if 0%{?suse_version} > 1100
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
%endif
|
%endif
|
||||||
|
cflags ()
|
||||||
|
{
|
||||||
|
local flag=$1; shift
|
||||||
|
local var=$1; shift
|
||||||
|
test -n "${flag}" -a -n "${var}" || return
|
||||||
|
case "${!var}" in
|
||||||
|
*${flag}*) return
|
||||||
|
esac
|
||||||
|
set -o noclobber
|
||||||
|
case "$flag" in
|
||||||
|
-Wl,*)
|
||||||
|
if echo 'int main () { return 0; }' | \
|
||||||
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
||||||
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||||
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
|
fi
|
||||||
|
esac
|
||||||
|
set +o noclobber
|
||||||
|
}
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE -fno-strict-aliasing"
|
CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE"
|
||||||
CFLAGS="$CFLAGS -fstack-protector"
|
#cflags -DSUSE_IMAP_FORCE_SSL CFLAGS
|
||||||
#CFLAGS="$CFLAGS -DSUSE_IMAP_FORCE_SSL"
|
cflags -std=gnu99 CFLAGS
|
||||||
|
cflags -fno-strict-aliasing CFLAGS
|
||||||
|
cflags -fstack-protector CFLAGS
|
||||||
|
cflags -g3 CFLAGS
|
||||||
|
cflags -pipe CFLAGS
|
||||||
|
cflags -Wl,--as-needed LDFLAGS
|
||||||
|
cflags -Wl,-O2 LDFLAGS
|
||||||
|
cflags -Wl,--hash-size=8599 LDFLAGS
|
||||||
KRB5CFGPATH=%{S:6}
|
KRB5CFGPATH=%{S:6}
|
||||||
export CC CFLAGS KRB5CFGPATH
|
export CC CFLAGS LDFLAGS KRB5CFGPATH
|
||||||
chmod 755 $KRB5CFGPATH
|
chmod 755 $KRB5CFGPATH
|
||||||
./configure $RPM_ARCH-suse-linux \
|
./configure $RPM_ARCH-suse-linux \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
|
@ -1,22 +1,40 @@
|
|||||||
--- handler.c
|
--- handler.c
|
||||||
+++ handler.c 2013-04-18 12:51:41.414000078 +0000
|
+++ handler.c
|
||||||
@@ -1650,7 +1650,7 @@ int mutt_body_handler (BODY *b, STATE *s
|
@@ -778,7 +778,7 @@ static void enriched_set_flags (const wchar_t *tag, struct enriched_state *stte)
|
||||||
/* decode to a tempfile, saving the original destination */
|
static int text_enriched_handler (BODY *a, STATE *s)
|
||||||
fp = s->fpout;
|
{
|
||||||
#ifdef HAVE_FMEMOPEN
|
enum {
|
||||||
- if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
|
- TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
|
||||||
+ if ((s->fpout = open_wmemstream(&temp, &tempsize)) == NULL)
|
+ TEXT, TEXT_GOTWC, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
|
||||||
|
} state = TEXT;
|
||||||
|
|
||||||
|
long bytes = a->length;
|
||||||
|
@@ -807,7 +807,7 @@ static int text_enriched_handler (BODY *a, STATE *s)
|
||||||
|
{
|
||||||
|
if (state != ST_EOF)
|
||||||
|
{
|
||||||
|
- if (!bytes || (wc = fgetwc (s->fpin)) == WEOF)
|
||||||
|
+ if (state != TEXT_GOTWC && (!bytes || (fscanf (s->fpin, "%lc", &wc)) == EOF))
|
||||||
|
state = ST_EOF;
|
||||||
|
else
|
||||||
|
bytes--;
|
||||||
|
@@ -815,6 +815,8 @@ static int text_enriched_handler (BODY *a, STATE *s)
|
||||||
|
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
+ case TEXT_GOTWC:
|
||||||
|
+ state = TEXT;
|
||||||
|
case TEXT :
|
||||||
|
switch (wc)
|
||||||
{
|
{
|
||||||
mutt_error _("Unable to open memory stream!");
|
@@ -875,9 +877,8 @@ static int text_enriched_handler (BODY *a, STATE *s)
|
||||||
dprint (1, (debugfile, "Can't open memory stream.\n"));
|
enriched_flush (&stte, 1);
|
||||||
--- pattern.c
|
else
|
||||||
+++ pattern.c 2013-04-18 12:52:06.573939217 +0000
|
{
|
||||||
@@ -168,7 +168,7 @@ msg_search (CONTEXT *ctx, pattern_t* pat
|
- ungetwc (wc, s->fpin);
|
||||||
s.fpin = msg->fp;
|
bytes++;
|
||||||
s.flags = M_CHARCONV;
|
- state = TEXT;
|
||||||
#ifdef HAVE_FMEMOPEN
|
+ state = TEXT_GOTWC;
|
||||||
- if((s.fpout = open_memstream(&temp, &tempsize)) == NULL)
|
}
|
||||||
+ if((s.fpout = open_wmemstream(&temp, &tempsize)) == NULL)
|
break;
|
||||||
{
|
|
||||||
mutt_perror ("Error opening memstream");
|
|
||||||
return (0);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user