1 --- openssl-1.0.1e.orig/crypto/bio/b_sock.c 2013-03-05 19:12:46.758376542 +0000 2 +++ openssl-1.0.1e/crypto/bio/b_sock.c 2013-03-05 19:12:46.948378599 +0000 3 @@ -629,7 +629,8 @@ int BIO_get_accept_socket(char *host, in 4 struct sockaddr_in6 sa_in6; 5 #endif 6 } server,client; 7 - int s=INVALID_SOCKET,cs,addrlen; 8 + int s=INVALID_SOCKET,cs; 9 + socklen_t addrlen; 10 unsigned char ip[4]; 11 unsigned short port; 12 char *str=NULL,*e; 13 @@ -704,10 +705,10 @@ int BIO_get_accept_socket(char *host, in 14 15 if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break; 16 17 - addrlen = res->ai_addrlen<=sizeof(server) ? 18 + addrlen = res->ai_addrlen <= (socklen_t)sizeof(server) ? 19 res->ai_addrlen : 20 - sizeof(server); 21 - memcpy(&server, res->ai_addr, addrlen); 22 + (socklen_t)sizeof(server); 23 + memcpy(&server, res->ai_addr, (size_t)addrlen); 24 25 (*p_freeaddrinfo.f)(res); 26 goto again; 27 @@ -719,7 +720,7 @@ int BIO_get_accept_socket(char *host, in 28 memset((char *)&server,0,sizeof(server)); 29 server.sa_in.sin_family=AF_INET; 30 server.sa_in.sin_port=htons(port); 31 - addrlen = sizeof(server.sa_in); 32 + addrlen = (socklen_t)sizeof(server.sa_in); 33 34 if (h == NULL || strcmp(h,"*") == 0) 35 server.sa_in.sin_addr.s_addr=INADDR_ANY; 36 --- openssl-1.0.1e.orig/crypto/x509v3/v3_utl.c 2013-03-05 19:12:46.768376649 +0000 37 +++ openssl-1.0.1e/crypto/x509v3/v3_utl.c 2013-03-05 19:12:46.948378599 +0000 38 @@ -365,7 +365,7 @@ char *hex_to_string(const unsigned char 39 char *tmp, *q; 40 const unsigned char *p; 41 int i; 42 - const static char hexdig[] = "0123456789ABCDEF"; 43 + static const char hexdig[] = "0123456789ABCDEF"; 44 if(!buffer || !len) return NULL; 45 if(!(tmp = OPENSSL_malloc(len * 3 + 1))) { 46 X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE); 47