cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: OpenVMS changes needed for Curl 7.46 release

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 4 Jan 2016 20:51:48 +0100

On Mon, Jan 04, 2016 at 07:46:07AM -0600, John E. Malmberg wrote:
> Some minor patches needed to build Curl 7.46 on OpenVMS.
>
> Tested on OpenVMS/VAX 7.3, OpenVMS/Alpha 8.3/8.4, OpenVMS/IA64 8.4.
>
> Kits are now available for download, and the curl.haxx.se/download.html can
> be updated with the following URLs:
>
> http://sourceforge.net/projects/vms-ports/files/axp0830/vmsports-axpvms-83-curl-v0746--1.zip
>
> http://sourceforge.net/projects/vms-ports/files/axp0840/vmsports-axpvms-83-curl-v0746--1.zip

Note that this file name contain "83" (presumably VMS 8.3) while the directory contains
"84". Is that deliberate?

> http://sourceforge.net/projects/vms-ports/files/i640840/vmsports-i64vms-84-curl-v0746--1.zip
>
> http://sourceforge.net/projects/vms-ports/files/vax0730/vmsports-vaxvms-73-curl-v0746--1.zip

I've updated the download page with these.

+static int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a)
+ {
+ char buf[80], *p = buf;
+ int i;
+
+ if ((a == NULL) || (a->data == NULL))
+ return(BIO_write(bp,"NULL",4));
+ i=i2t_ASN1_OBJECT(buf,sizeof buf,a);
+ if (i > (int)(sizeof(buf) - 1))
+ {
+ p = OPENSSL_malloc(i + 1);
+ if (!p)
+ return -1;
+ i2t_ASN1_OBJECT(p,i + 1,a);
+ }
+ if (i <= 0)
+ return BIO_write(bp, "<INVALID>", 9);

This path will cause a memory leak of the heap buffer at p.

+ BIO_write(bp,p,i);
+ if (p != buf)
+ OPENSSL_free(p);
+ return(i);

The indentation of this line is off. This code also doesn't follow the curl style.

+ }

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-04