Gentoo Archives: gentoo-commits

From: "Wulf Krueger (philantrop)" <philantrop@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-pda/jpilot-Mail/files: jpilot-Mail-0.1.7.patch digest-jpilot-Mail-0.1.7
Date: Tue, 18 Sep 2007 17:19:02
Message-Id: E1IXgbU-0000Yk-8M@stork.gentoo.org
1 philantrop 07/09/18 17:11:16
2
3 Added: jpilot-Mail-0.1.7.patch digest-jpilot-Mail-0.1.7
4 Log:
5 Initial ebuild based upon bug 86017. Thanks to Serhij S. Stasyuk.
6 (Portage version: 2.1.3.9)
7
8 Revision Changes Path
9 1.1 app-pda/jpilot-Mail/files/jpilot-Mail-0.1.7.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/jpilot-Mail/files/jpilot-Mail-0.1.7.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/jpilot-Mail/files/jpilot-Mail-0.1.7.patch?rev=1.1&content-type=text/plain
13
14 Index: jpilot-Mail-0.1.7.patch
15 ===================================================================
16 diff -Nru jpilot-Mail-0.1.7.orig/src/connect.c jpilot-Mail-0.1.7/src/connect.c
17 --- jpilot-Mail-0.1.7.orig/src/connect.c 2003-01-11 17:52:28.000000000 +0200
18 +++ jpilot-Mail-0.1.7/src/connect.c 2007-01-02 11:43:09.000000000 +0200
19 @@ -24,7 +24,7 @@
20 if(inet_aton(ip, &ia)){
21 mxip_addr mxip;
22
23 - mxip.name = g_strdup(ip);
24 + mxip.name = (guchar*)g_strdup(ip);
25 mxip.pref = 0;
26 mxip.ip = (guint32) *(guint32 *)(&ia);
27 list = g_list_append(list, g_memdup(&mxip, sizeof(mxip)));
28 diff -Nru jpilot-Mail-0.1.7.orig/src/lookup.c jpilot-Mail-0.1.7/src/lookup.c
29 --- jpilot-Mail-0.1.7.orig/src/lookup.c 2002-06-27 21:36:26.000000000 +0300
30 +++ jpilot-Mail-0.1.7/src/lookup.c 2007-01-02 11:43:48.000000000 +0200
31 @@ -325,7 +325,7 @@
32 mxip_addr mxip;
33 mxip.ip = *(guint32 *)(haddr);
34 mxip.pref = 0;
35 - mxip.name = g_strdup(hent->h_name);
36 + mxip.name = (guchar*)g_strdup(hent->h_name);
37 list = g_list_append(list, g_memdup(&mxip, sizeof(mxip)));
38 }
39 }
40 diff -Nru jpilot-Mail-0.1.7.orig/src/mail.c jpilot-Mail-0.1.7/src/mail.c
41 --- jpilot-Mail-0.1.7.orig/src/mail.c 2004-07-18 21:06:42.000000000 +0300
42 +++ jpilot-Mail-0.1.7/src/mail.c 2007-01-02 12:15:30.000000000 +0200
43 @@ -56,7 +56,7 @@
44 static int show_category = 0;
45 static int glob_row_selected;
46
47 -static struct MyMail *glob_mymail_list = NULL;
48 +struct MyMail *glob_mymail_list = NULL;
49
50 struct Preferences prefs;
51 struct MailSyncPref mailSyncPref;
52 @@ -75,6 +75,8 @@
53 *minor_version = 99;
54 }
55
56 +void multibyte_safe_strncpy(char *dst, char *src, size_t len);
57 +
58 static void free_mymail_list(struct MyMail **ppM)
59 {
60 struct MyMail *pM, *next_pM;
61 @@ -195,7 +197,7 @@
62 if (fptr)
63 {
64 gchar *line = NULL;
65 - gint line_size = 0;
66 + size_t line_size = 0;
67
68 while (!feof(fptr))
69 {
70 @@ -1001,7 +1003,7 @@
71
72 if (size > 0)
73 {
74 - char *buf = g_malloc(size);
75 + unsigned char *buf = g_malloc(size);
76
77 if (buf)
78 {
79 @@ -1030,7 +1032,7 @@
80 if (size > 0)
81 {
82 buf_rec br;
83 - char *buf = g_malloc(size);
84 + unsigned char *buf = g_malloc(size);
85
86 if (buf)
87 {
88 @@ -1212,7 +1214,7 @@
89
90 temp_str = malloc((len = strlen(mai.category.name[i])*2+1));
91 multibyte_safe_strncpy(temp_str, mai.category.name[i], len);
92 - jp_charset_p2j(temp_str, len);
93 + jp_charset_p2j((unsigned char *)temp_str, len);
94 categories[i] = temp_str;
95 }
96 categories[i] = NULL;
97 diff -Nru jpilot-Mail-0.1.7.orig/src/mail_get.c jpilot-Mail-0.1.7/src/mail_get.c
98 --- jpilot-Mail-0.1.7.orig/src/mail_get.c 2004-07-18 20:31:28.000000000 +0300
99 +++ jpilot-Mail-0.1.7/src/mail_get.c 2007-01-02 12:16:29.000000000 +0200
100 @@ -68,7 +68,7 @@
101 {
102 GList *id_list = NULL;
103 gchar *line = NULL;
104 - gint line_size = 0;
105 + size_t line_size = 0;
106
107 while (!feof(fptr))
108 {
109 @@ -179,7 +179,7 @@
110 {
111 FILE *in;
112 char *line = NULL;
113 - gint line_size = 0;
114 + size_t line_size = 0;
115 GList *id_list = read_msgids();
116
117 // conf.debug_level = 5;
118 diff -Nru jpilot-Mail-0.1.7.orig/src/mail_send.c jpilot-Mail-0.1.7/src/mail_send.c
119 --- jpilot-Mail-0.1.7.orig/src/mail_send.c 2004-04-29 20:27:48.000000000 +0300
120 +++ jpilot-Mail-0.1.7/src/mail_send.c 2007-01-02 12:16:58.000000000 +0200
121 @@ -233,7 +233,7 @@
122
123 if (pMail->mail.body != NULL)
124 {
125 - guchar *p = pMail->mail.body;
126 + gchar *p = pMail->mail.body;
127
128 while (*p)
129 {
130 diff -Nru jpilot-Mail-0.1.7.orig/src/mbox.c jpilot-Mail-0.1.7/src/mbox.c
131 --- jpilot-Mail-0.1.7.orig/src/mbox.c 2004-04-17 19:24:15.000000000 +0300
132 +++ jpilot-Mail-0.1.7/src/mbox.c 2007-01-02 11:49:55.000000000 +0200
133 @@ -25,7 +25,8 @@
134 gboolean mbox_read(message * msg, FILE * in, gchar ** from_line, int max_size)
135 {
136 gchar *line = NULL;
137 - gint line_size = 0, line_cnt = 0;
138 +// gint line_size = 0, line_cnt = 0;
139 + size_t line_size = 0;
140 gint data_size = 0;
141 gboolean in_headers = TRUE;
142 int l_no = 1;
143 @@ -91,7 +92,7 @@
144 msg->data_list = g_list_append(msg->data_list, g_strdup(line));
145 data_size += strlen(line);
146 }
147 - line_cnt++;
148 +// line_cnt++;
149 }
150 }
151
152 diff -Nru jpilot-Mail-0.1.7.orig/src/smtp_out.c jpilot-Mail-0.1.7/src/smtp_out.c
153 --- jpilot-Mail-0.1.7.orig/src/smtp_out.c 2003-01-11 17:52:28.000000000 +0200
154 +++ jpilot-Mail-0.1.7/src/smtp_out.c 2007-01-02 12:11:27.000000000 +0200
155 @@ -66,7 +66,7 @@
156 gchar *set_heloname(smtp_base *psb, gchar *default_name, gboolean do_correct)
157 {
158 struct sockaddr_in sname;
159 - int len = sizeof(struct sockaddr_in);
160 + socklen_t len = sizeof(struct sockaddr_in);
161 struct hostent *host_entry;
162
163 if(do_correct){
164 @@ -479,11 +479,11 @@
165 if((addr = connect_resolvelist(&sock, host, port, resolve_list))){
166 /* create structure to hold status data: */
167 psb = create_smtpbase(sock);
168 - psb->remote_host = addr->name;
169 + psb->remote_host = (gchar*)addr->name;
170
171 DEBUG(5){
172 struct sockaddr_in name;
173 - int len = sizeof(struct sockaddr);
174 + socklen_t len = sizeof(struct sockaddr);
175 getsockname(sock, (struct sockaddr *)(&name), &len);
176 debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr));
177 }
178 diff -Nru jpilot-Mail-0.1.7.orig/src/utils.h jpilot-Mail-0.1.7/src/utils.h
179 --- jpilot-Mail-0.1.7.orig/src/utils.h 2002-06-27 21:36:26.000000000 +0300
180 +++ jpilot-Mail-0.1.7/src/utils.h 2007-01-02 11:28:45.000000000 +0200
181 @@ -21,4 +21,6 @@
182
183 int get_home_file_name(char *file, char *full_name, int max_size);
184
185 +extern void multibyte_safe_strncpy(char *dst, char *src, size_t len);
186 +
187 #endif
188
189
190
191 1.1 app-pda/jpilot-Mail/files/digest-jpilot-Mail-0.1.7
192
193 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/jpilot-Mail/files/digest-jpilot-Mail-0.1.7?rev=1.1&view=markup
194 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/jpilot-Mail/files/digest-jpilot-Mail-0.1.7?rev=1.1&content-type=text/plain
195
196 Index: digest-jpilot-Mail-0.1.7
197 ===================================================================
198 MD5 d90034d444948ff8653d04cc8b4ba79f jpilot-Mail-0.1.7.tar.gz 481041
199 RMD160 95390bbcd73658561f1a91e83cd65f641e654424 jpilot-Mail-0.1.7.tar.gz 481041
200 SHA256 99169a74564053ef6c62da1738951570fcb3fcc044276f7040d334f553966bbe jpilot-Mail-0.1.7.tar.gz 481041
201
202
203
204 --
205 gentoo-commits@g.o mailing list