diff options
author | joerg <joerg@pkgsrc.org> | 2008-08-02 20:33:50 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-08-02 20:33:50 +0000 |
commit | 2d14d746c33ed096821a94626a0607aa53d26fe9 (patch) | |
tree | 8901b5966bac844405a560018181d94cc4eccd35 /pkgtools/pkg_install/files/lib/pkcs7.c | |
parent | 3e4bed6c122de22806583e1d7904c4f0e9a71d46 (diff) | |
download | pkgsrc-2d14d746c33ed096821a94626a0607aa53d26fe9.tar.gz |
Most memory allocation failures were fatal already and the majority of
the rest lacked an explicit check. Add the usual x* wrappers around
malloc and friends that explicitly terminate on error and use them in
all but Dewey.
Diffstat (limited to 'pkgtools/pkg_install/files/lib/pkcs7.c')
-rw-r--r-- | pkgtools/pkg_install/files/lib/pkcs7.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/lib/pkcs7.c b/pkgtools/pkg_install/files/lib/pkcs7.c index cfeb1570180..2449eb1af4b 100644 --- a/pkgtools/pkg_install/files/lib/pkcs7.c +++ b/pkgtools/pkg_install/files/lib/pkcs7.c @@ -1,4 +1,4 @@ -/* $NetBSD: pkcs7.c,v 1.1.2.6 2008/07/23 18:59:18 joerg Exp $ */ +/* $NetBSD: pkcs7.c,v 1.1.2.7 2008/08/02 20:33:50 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" #endif @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: pkcs7.c,v 1.1.2.6 2008/07/23 18:59:18 joerg Exp $"); +__RCSID("$NetBSD: pkcs7.c,v 1.1.2.7 2008/08/02 20:33:50 joerg Exp $"); /*- * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. @@ -308,7 +308,7 @@ easy_pkcs7_sign(const char *content, size_t len, out = BIO_new(BIO_s_mem()); PEM_write_bio_PKCS7(out, p7); *signature_len = BIO_get_mem_data(out, &tmp_sig); - *signature = malloc(*signature_len); + *signature = xmalloc(*signature_len); memcpy(*signature, tmp_sig, *signature_len); BIO_free_all(out); |