Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/pkg_install/dist/lib Fixed installation of sign...



details:   https://anonhg.NetBSD.org/src/rev/c415964c8775
branches:  trunk
changeset: 789866:c415964c8775
user:      khorben <khorben%NetBSD.org@localhost>
date:      Wed Sep 11 12:59:19 2013 +0000

description:
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:

 external/bsd/pkg_install/dist/lib/pkg_signature.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (30 lines):

diff -r 657e87730f2d -r c415964c8775 external/bsd/pkg_install/dist/lib/pkg_signature.c
--- a/external/bsd/pkg_install/dist/lib/pkg_signature.c Wed Sep 11 09:59:52 2013 +0000
+++ b/external/bsd/pkg_install/dist/lib/pkg_signature.c Wed Sep 11 12:59:19 2013 +0000
@@ -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 <joerg%NetBSD.org@localhost>.
@@ -325,10 +325,7 @@
 
        *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);



Home | Main Index | Thread Index | Old Index