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.
Commit
9ce6771c782b82688419dbed72d5fc544bfadb9d
Parent
daa6a0eb9b03c4f…
1 file changed
+1
-1
+1
-1
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -287,11 +287,11 @@ | ||
| 287 | 287 | ** This is used to populate the ipaddr column of the rcvfrom table, |
| 288 | 288 | ** if any files are received from the server. |
| 289 | 289 | */ |
| 290 | 290 | { |
| 291 | 291 | /* 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); | |
| 293 | 293 | g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | X509_free(cert); |
| 297 | 297 | return 0; |
| 298 | 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 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 |