cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Howto use libcurl with libnss and PKCS11 Interface to a Security Module?

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Tue, 29 Mar 2016 12:26:27 +0200

On Tuesday 29 March 2016 10:18:01 Oliver Graute wrote:
> then I got this error caused by uninitialized variable.
>
> 4_glibc_PTH_64_OPT.OBJ/include -I../../../../dist/public/nss
> -I../../../../dist/private/nss -I../../../../dist/public/nspr pinst.c
> | pinst.c: In function 'AddCertificate':
> | pinst.c:584:18: error: 'i' may be used uninitialized in this function
> | [-Werror=maybe-uninitialized]|
> | nickname = getUniquePEMNicknameFromFilename(certfile, i);
> |
> | ^
>
> and this:
>
> 4_glibc_PTH_64_OPT.OBJ/include -I../../../../dist/public/nss
> -I../../../../dist/private/nss -I../../../../dist/public/nspr pinst.c
> | pinst.c: In function 'AddCertificate':
> | pinst.c:624:16: error: 'o' may be used uninitialized in this function
> | [-Werror=maybe-uninitialized]|
> | nss_ZFreeIf(o);
> |
> | ^
> |
> | cc1: all warnings being treated as errors
>
> I fixed both with attached patches.

Thanks for the patches! I have squashed them to a single commit and pushed:

    https://git.fedorahosted.org/cgit/nss-pem.git/commit/?id=429b0222

I am afraid that many other similar issues are still lurking in the code
of AddCertificate(). The function is full of copy/pasted code that has
been fixed in its original location only, because the code path is not
used by curl, nor any other software I know of.

> I will send them to nss-dev to.

nss-pem is not part of the upstream nss. The correct mailing list for such
patches is nss-pem-devel (CC'd).

Kamil

> Best Regards,
>
> Oliver
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-29