From 32e96396534403438c705e309fd0fb414bb6bdea Mon Sep 17 00:00:00 2001 From: khorben Date: Wed, 11 Sep 2013 14:10:05 +0000 Subject: 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 --- pkgtools/pkg_install/files/lib/pkg_signature.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'pkgtools') 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 #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 . @@ -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); -- cgit v1.2.3