On Sun, Jan 12, 2014 at 05:06:18PM +0100, Alexander Bluhm wrote:
> Hi,
> 
> I would like to update p5-Net-SSLeay, but there are compiler warnings
> about bad length checks.  I have reported the bug upstream.
> 
> https://rt.cpan.org/Public/Bug/Display.html?id=92076

Upstream has accepted my fix, it will be included in the next
Net::SSLeay version.

So I will commit my ports patch if there are no objections.

bluhm

> 
> ok?
> 
> bluhm
> 
> Index: security/p5-Net_SSLeay/Makefile
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/ports/security/p5-Net_SSLeay/Makefile,v
> retrieving revision 1.45
> diff -u -p -r1.45 Makefile
> --- security/p5-Net_SSLeay/Makefile   8 Jun 2013 22:04:54 -0000       1.45
> +++ security/p5-Net_SSLeay/Makefile   12 Jan 2014 15:19:23 -0000
> @@ -4,7 +4,7 @@ SHARED_ONLY =         Yes
>  
>  COMMENT =            perl module for using OpenSSL
>  
> -DISTNAME =           Net-SSLeay-1.55
> +DISTNAME =           Net-SSLeay-1.57
>  
>  CATEGORIES =         security
>  
> Index: security/p5-Net_SSLeay/distinfo
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/ports/security/p5-Net_SSLeay/distinfo,v
> retrieving revision 1.26
> diff -u -p -r1.26 distinfo
> --- security/p5-Net_SSLeay/distinfo   8 Jun 2013 22:04:54 -0000       1.26
> +++ security/p5-Net_SSLeay/distinfo   12 Jan 2014 15:19:35 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (Net-SSLeay-1.55.tar.gz) = 
> jNXwlyLge05DYQLLOkuTYj11PBcWZcqXUsOzmmLqOnk=
> -SIZE (Net-SSLeay-1.55.tar.gz) = 394657
> +SHA256 (Net-SSLeay-1.57.tar.gz) = 
> Zg9CgzmC7rI8RfRtooYnw/79bv2zOjRIDbapJQVdxoI=
> +SIZE (Net-SSLeay-1.57.tar.gz) = 398797
> Index: security/p5-Net_SSLeay/patches/patch-SSLeay_xs
> ===================================================================
> RCS file: security/p5-Net_SSLeay/patches/patch-SSLeay_xs
> diff -N security/p5-Net_SSLeay/patches/patch-SSLeay_xs
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ security/p5-Net_SSLeay/patches/patch-SSLeay_xs    12 Jan 2014 15:50:44 
> -0000
> @@ -0,0 +1,52 @@
> +$OpenBSD$
> +https://rt.cpan.org/Public/Bug/Display.html?id=92076
> +--- SSLeay.xs.orig   Tue Jan  7 08:28:35 2014
> ++++ SSLeay.xs        Sat Jan 11 18:53:52 2014
> +@@ -780,8 +780,8 @@ int next_proto_helper_AV2protodata(AV * list, unsigned
> +     if (last_index<0) return 0;
> +     for(i=0; i<=last_index; i++) {
> +         char *p = SvPV_nolen(*av_fetch(list, i, 0));
> +-        int len = strlen(p);
> +-        if (len<0 || len>255) return 0;
> ++        size_t len = strlen(p);
> ++        if (len>255) return 0;
> +         if (out) {
> +             /* if out == NULL we only calculate the length of output */
> +             out[ptr] = (unsigned char)len;
> +@@ -811,7 +811,7 @@ int next_proto_select_cb_invoke(SSL *ssl, unsigned cha
> + {
> +     SV *cb_func, *cb_data;
> +     unsigned char *next_proto_data;
> +-    unsigned char next_proto_len;
> ++    size_t next_proto_len;
> +     int next_proto_status;
> +     SSL_CTX *ctx = SSL_get_SSL_CTX(ssl);
> +     STRLEN n_a;
> +@@ -941,7 +941,7 @@ int alpn_select_cb_invoke(SSL *ssl, const unsigned cha
> + {
> +     SV *cb_func, *cb_data;
> +     unsigned char *alpn_data;
> +-    unsigned char alpn_len;
> ++    size_t alpn_len;
> +     SSL_CTX *ctx = SSL_get_SSL_CTX(ssl);
> +     STRLEN n_a;
> + 
> +@@ -1010,7 +1010,8 @@ int alpn_select_cb_invoke(SSL *ssl, const unsigned cha
> + int pem_password_cb_invoke(char *buf, int bufsize, int rwflag, void *data) {
> +     dSP;
> +     char *str;
> +-    int count = -1, str_len = 0;
> ++    int count = -1;
> ++    size_t str_len = 0;
> +     simple_cb_data_t* cb = (simple_cb_data_t*)data;
> +     STRLEN n_a;
> + 
> +@@ -3252,7 +3253,7 @@ PEM_get_string_PrivateKey(pk,passwd=NULL,enc_alg=NULL)
> +         BIO *bp;
> +         int i, n;
> +         char *buf;
> +-        int passwd_len = 0;
> ++        size_t passwd_len = 0;
> +         pem_password_cb * cb = NULL;
> +         void * u = NULL;
> +     CODE:

Reply via email to