rpms/sylpheed/devel sylpheed-2.3.1-escaped-quotes.patch, NONE, 1.1 sylpheed.spec, 1.48, 1.49
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Fri May 18 13:56:55 UTC 2007
Author: mschwendt
Update of /cvs/extras/rpms/sylpheed/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17010
Modified Files:
sylpheed.spec
Added Files:
sylpheed-2.3.1-escaped-quotes.patch
Log Message:
* Fri May 18 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-4
- Backport patch for libsylph to improve/fix handling of escapes
and quotes in headers.
sylpheed-2.3.1-escaped-quotes.patch:
--- NEW FILE sylpheed-2.3.1-escaped-quotes.patch ---
diff -Nur sylpheed-2.3.1-orig/libsylph/procheader.c sylpheed-2.3.1/libsylph/procheader.c
--- sylpheed-2.3.1-orig/libsylph/procheader.c 2007-01-12 07:14:53.000000000 +0100
+++ sylpheed-2.3.1/libsylph/procheader.c 2007-05-18 15:44:01.000000000 +0200
@@ -723,7 +723,7 @@
Xstrdup_a(tmp, str, return NULL);
if (*tmp == '\"') {
- extract_quote(tmp, '\"');
+ extract_quote_with_escape(tmp, '\"');
g_strstrip(tmp);
} else if (strchr(tmp, '<')) {
eliminate_parenthesis(tmp, '<', '>');
@@ -734,7 +734,7 @@
g_strstrip(tmp);
}
} else if (strchr(tmp, '(')) {
- extract_parenthesis(tmp, '(', ')');
+ extract_parenthesis_with_escape(tmp, '(', ')');
g_strstrip(tmp);
}
diff -Nur sylpheed-2.3.1-orig/libsylph/utils.c sylpheed-2.3.1/libsylph/utils.c
--- sylpheed-2.3.1-orig/libsylph/utils.c 2007-01-15 06:08:42.000000000 +0100
+++ sylpheed-2.3.1/libsylph/utils.c 2007-05-18 15:44:13.000000000 +0200
@@ -652,6 +652,36 @@
*destp = '\0';
}
+void extract_parenthesis_with_escape(gchar *str, gchar op, gchar cl)
+{
+ register gchar *srcp, *destp;
+ gint in_brace;
+
+ srcp = destp = str;
+
+ while ((srcp = strchr(srcp, op))) {
+ if (destp > str)
+ *destp++ = ' ';
+ ++srcp;
+ in_brace = 1;
+ while (*srcp) {
+ if (*srcp == op)
+ in_brace++;
+ else if (*srcp == cl)
+ in_brace--;
+
+ if (in_brace == 0)
+ break;
+
+ if (*srcp == '\\' && *(srcp + 1) != '\0')
+ ++srcp;
+
+ *destp++ = *srcp++;
+ }
+ }
+ *destp = '\0';
+}
+
void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr,
gchar op, gchar cl)
{
@@ -713,6 +743,25 @@
}
}
+void extract_quote_with_escape(gchar *str, gchar quote_chr)
+{
+ register gchar *sp, *dp;
+
+ if ((sp = strchr(str, quote_chr))) {
+ dp = sp;
+ ++sp;
+ while (*sp) {
+ if (*sp == quote_chr)
+ break;
+ else if (*sp == '\\' && *(sp + 1) != '\0')
+ ++sp;
+
+ *dp++ = *sp++;
+ }
+ *dp = '\0';
+ }
+}
+
void eliminate_address_comment(gchar *str)
{
register gchar *srcp, *destp;
diff -Nur sylpheed-2.3.1-orig/libsylph/utils.h sylpheed-2.3.1/libsylph/utils.h
--- sylpheed-2.3.1-orig/libsylph/utils.h 2007-01-12 07:14:53.000000000 +0100
+++ sylpheed-2.3.1/libsylph/utils.h 2007-05-18 15:44:13.000000000 +0200
@@ -257,6 +257,9 @@
void extract_parenthesis (gchar *str,
gchar op,
gchar cl);
+void extract_parenthesis_with_escape (gchar *str,
+ gchar op,
+ gchar cl);
void extract_parenthesis_with_skip_quote (gchar *str,
gchar quote_chr,
@@ -267,6 +270,8 @@
gchar quote_chr);
void extract_quote (gchar *str,
gchar quote_chr);
+void extract_quote_with_escape (gchar *str,
+ gchar quote_chr);
void eliminate_address_comment (gchar *str);
gchar *strchr_with_skip_quote (const gchar *str,
gint quote_chr,
Index: sylpheed.spec
===================================================================
RCS file: /cvs/extras/rpms/sylpheed/devel/sylpheed.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- sylpheed.spec 15 May 2007 07:21:04 -0000 1.48
+++ sylpheed.spec 18 May 2007 13:56:50 -0000 1.49
@@ -5,7 +5,7 @@
Summary: GTK+ based, lightweight, and fast email client
Name: sylpheed
Version: 2.3.1
-Release: 3%{?dist}
+Release: 4
License: GPL
URL: http://sylpheed.sraoss.jp/
Group: Applications/Internet
@@ -26,6 +26,7 @@
Patch4: sylpheed-2.2.5-prefs_common.patch
Patch5: sylpheed-2.3.1-apop-cve-2007-1558.patch
Patch6: sylpheed-2.3.1-pgpmime-signed-compose.patch
+Patch7: sylpheed-2.3.1-escaped-quotes.patch
%description
This program is an X based fast email client which has features
@@ -50,6 +51,7 @@
%patch4 -p1 -b .prefs_common
%patch5 -p1 -b .apop
%patch6 -p1 -b .pgpmime-signed-compose
+%patch7 -p1 -b .escaped-quotes
%build
%configure --enable-ssl %{!?_without_gpgme:--enable-gpgme} \
@@ -89,6 +91,10 @@
%{_mandir}/man1/*
%changelog
+* Fri May 18 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-4
+- Backport patch for libsylph to improve/fix handling of escapes
+ and quotes in headers.
+
* Sun May 13 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-3
- Patch PGP/MIME signed message compose, so it doesn't strip off
whitespace of the "-- " body signature delimiter. It's upstream
More information about the fedora-extras-commits
mailing list