mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
d83a3d71bc
Merge in RedPhone // FREEBIE
47 lines
1.7 KiB
Diff
47 lines
1.7 KiB
Diff
--- openssl-1.0.1e.orig/crypto/bio/b_sock.c 2013-03-05 19:12:46.758376542 +0000
|
|
+++ openssl-1.0.1e/crypto/bio/b_sock.c 2013-03-05 19:12:46.948378599 +0000
|
|
@@ -629,7 +629,8 @@ int BIO_get_accept_socket(char *host, in
|
|
struct sockaddr_in6 sa_in6;
|
|
#endif
|
|
} server,client;
|
|
- int s=INVALID_SOCKET,cs,addrlen;
|
|
+ int s=INVALID_SOCKET,cs;
|
|
+ socklen_t addrlen;
|
|
unsigned char ip[4];
|
|
unsigned short port;
|
|
char *str=NULL,*e;
|
|
@@ -704,10 +705,10 @@ int BIO_get_accept_socket(char *host, in
|
|
|
|
if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break;
|
|
|
|
- addrlen = res->ai_addrlen<=sizeof(server) ?
|
|
+ addrlen = res->ai_addrlen <= (socklen_t)sizeof(server) ?
|
|
res->ai_addrlen :
|
|
- sizeof(server);
|
|
- memcpy(&server, res->ai_addr, addrlen);
|
|
+ (socklen_t)sizeof(server);
|
|
+ memcpy(&server, res->ai_addr, (size_t)addrlen);
|
|
|
|
(*p_freeaddrinfo.f)(res);
|
|
goto again;
|
|
@@ -719,7 +720,7 @@ int BIO_get_accept_socket(char *host, in
|
|
memset((char *)&server,0,sizeof(server));
|
|
server.sa_in.sin_family=AF_INET;
|
|
server.sa_in.sin_port=htons(port);
|
|
- addrlen = sizeof(server.sa_in);
|
|
+ addrlen = (socklen_t)sizeof(server.sa_in);
|
|
|
|
if (h == NULL || strcmp(h,"*") == 0)
|
|
server.sa_in.sin_addr.s_addr=INADDR_ANY;
|
|
--- openssl-1.0.1e.orig/crypto/x509v3/v3_utl.c 2013-03-05 19:12:46.768376649 +0000
|
|
+++ openssl-1.0.1e/crypto/x509v3/v3_utl.c 2013-03-05 19:12:46.948378599 +0000
|
|
@@ -365,7 +365,7 @@ char *hex_to_string(const unsigned char
|
|
char *tmp, *q;
|
|
const unsigned char *p;
|
|
int i;
|
|
- const static char hexdig[] = "0123456789ABCDEF";
|
|
+ static const char hexdig[] = "0123456789ABCDEF";
|
|
if(!buffer || !len) return NULL;
|
|
if(!(tmp = OPENSSL_malloc(len * 3 + 1))) {
|
|
X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE);
|