summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2013-09-11 14:10:05 +0000
committerkhorben <khorben@pkgsrc.org>2013-09-11 14:10:05 +0000
commit32e96396534403438c705e309fd0fb414bb6bdea (patch)
tree8030ebbcf08369e8bbb72d2e0c747ea25989b92e /pkgtools
parent8d30544969450b44510a113c32ebebc007a41598 (diff)
downloadpkgsrc-32e96396534403438c705e309fd0fb414bb6bdea.tar.gz
Fixed installation of signed packages. Some variables part of struct
signature_archive were not initialized properly, therefore randomly failing in the verify_signature_read_cb() callback. Partly closes PR pkg/48194; pkgsrc needs to be updated as well. "please commit" agc@ XXX pull-up to netbsd-6
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_signature.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/lib/pkg_signature.c b/pkgtools/pkg_install/files/lib/pkg_signature.c
index 089234e010d..1640ec579d0 100644
--- a/pkgtools/pkg_install/files/lib/pkg_signature.c
+++ b/pkgtools/pkg_install/files/lib/pkg_signature.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pkg_signature.c,v 1.10 2010/02/20 04:40:03 joerg Exp $ */
+/* $NetBSD: pkg_signature.c,v 1.11 2013/09/11 14:10:05 khorben Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: pkg_signature.c,v 1.10 2010/02/20 04:40:03 joerg Exp $");
+__RCSID("$NetBSD: pkg_signature.c,v 1.11 2013/09/11 14:10:05 khorben Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -325,10 +325,7 @@ pkg_verify_signature(const char *archive_name, struct archive **archive,
*pkgname = NULL;
- state = xmalloc(sizeof(*state));
- state->sign_blocks = NULL;
- state->sign_buf = NULL;
- state->archive = NULL;
+ state = xcalloc(sizeof(*state), 1);
r = read_file_from_archive(archive_name, *archive, entry, HASH_FNAME,
&hash_file, &hash_len);