Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://evolution-1.0.8-11.src.rpm:12270924/evolution-1.0.8-sanity-check-uue-header.patch  info  downloads

--- evolution-1.0.8/mail/mail-format.c.uueheader	2003-03-19 01:55:59.000000000 -0500
+++ evolution-1.0.8/mail/mail-format.c	2003-03-19 02:09:46.000000000 -0500
@@ -1173,7 +1173,7 @@
 	 * has decided to call text/plain because it starts with English
 	 * text...)
 	 */
-	check_specials = !g_strcasecmp (mime_type, "text/plain");
+	check_specials = header_content_type_is (type, "text", "plain");
 	
 	p = text;
 	while (p && check_specials) {
@@ -1440,7 +1440,7 @@
 		guint offset, MailDisplay *md)
 {
 	int mode, len, state = 0;
-	char *filename, *estart, *p, *out, uulen = 0;
+	char *filename, *eoln, *p, *out, uulen = 0;
 	guint32 save = 0;
 	CamelMimePart *part;
 	
@@ -1450,23 +1450,26 @@
 	mode = strtoul (start + 6, &p, 8);
 	if (p == start + 6 || *p != ' ')
 		return start;
-	estart = strchr (start, '\n');
-	if (!estart)
+
+        if (!(eoln = strchr (start, '\n')))
 		return start;
 	
-	while (isspace ((unsigned char)*p))
+	while (*p == ' ' || *p == '\t')
 		p++;
-	filename = g_strndup (p, estart++ - p);
+
+	if (p == eoln)
+	    return start;
+	filename = g_strndup (p, eoln - p);
 	
 	/* Make sure there's an end line. */
-	p = strstr (p, "\nend\n");
-	if (!p) {
+	if (!(p = strstr (p, "\nend\n"))) {	
 		g_free (filename);
 		return start;
 	}
 	
-	out = g_malloc (p - estart);
-	len = uudecode_step (estart, p - estart, out, &state, &save, &uulen);
+	eoln++;
+	out = g_malloc (p - eoln);
+	len = uudecode_step (eoln, p - eoln, out, &state, &save, &uulen);
 	
 	part = fake_mime_part_from_data (out, len, "application/octet-stream",
 					 offset, md);
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 Oliver Maruhn