Fossil SCM

I think I fix a possible bug on platforms where 'char' has signed meaning, on the code about noting the 'rcvfrom' ipv4 address.

viriketo 2011-09-01 20:38 UTC ssl_peer_ip
Commit 9ce6771c782b82688419dbed72d5fc544bfadb9d
1 file changed +1 -1
+1 -1
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -287,11 +287,11 @@
287287
** This is used to populate the ipaddr column of the rcvfrom table,
288288
** if any files are received from the server.
289289
*/
290290
{
291291
/* IPv4 only code */
292
- const char *ip = BIO_get_conn_ip(iBio);
292
+ const unsigned char *ip = (const unsigned char *) BIO_get_conn_ip(iBio);
293293
g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
294294
}
295295
296296
X509_free(cert);
297297
return 0;
298298
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -287,11 +287,11 @@
287 ** This is used to populate the ipaddr column of the rcvfrom table,
288 ** if any files are received from the server.
289 */
290 {
291 /* IPv4 only code */
292 const char *ip = BIO_get_conn_ip(iBio);
293 g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
294 }
295
296 X509_free(cert);
297 return 0;
298
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -287,11 +287,11 @@
287 ** This is used to populate the ipaddr column of the rcvfrom table,
288 ** if any files are received from the server.
289 */
290 {
291 /* IPv4 only code */
292 const unsigned char *ip = (const unsigned char *) BIO_get_conn_ip(iBio);
293 g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
294 }
295
296 X509_free(cert);
297 return 0;
298

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button