Module Name:    src
Committed By:   msaitoh
Date:           Tue Sep 17 19:38:00 UTC 2013

Modified Files:
        src/external/bsd/pkg_install/dist/lib [netbsd-6]: pkg_signature.c

Log Message:
Pull up following revision(s) (requested by khorben in ticket #943):
        external/bsd/pkg_install/dist/lib/pkg_signature.c: revision 1.2
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.1.1.7.8.1 \
    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.1.1.7.8.1
--- 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	Tue Sep 17 19:38:00 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.1.1.7.8.1 2013/09/17 19:38:00 msaitoh 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.1.1.7.8.1 2013/09/17 19:38:00 msaitoh 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);

Reply via email to