Module Name: src Committed By: khorben Date: Wed Sep 11 12:59:19 UTC 2013
Modified Files: src/external/bsd/pkg_install/dist/lib: pkg_signature.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 \ src/external/bsd/pkg_install/dist/lib/pkg_signature.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/pkg_install/dist/lib/pkg_signature.c diff -u src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7 src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.2 --- src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7 Sat Feb 20 04:41:58 2010 +++ src/external/bsd/pkg_install/dist/lib/pkg_signature.c Wed Sep 11 12:59:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pkg_signature.c,v 1.1.1.7 2010/02/20 04:41:58 joerg Exp $ */ +/* $NetBSD: pkg_signature.c,v 1.2 2013/09/11 12:59:19 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.1.1.7 2010/02/20 04:41:58 joerg Exp $"); +__RCSID("$NetBSD: pkg_signature.c,v 1.2 2013/09/11 12:59:19 khorben Exp $"); /*- * Copyright (c) 2008 Joerg Sonnenberger <jo...@netbsd.org>. @@ -325,10 +325,7 @@ pkg_verify_signature(const char *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);