summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_install
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2010-04-20 21:22:38 +0000
committerjoerg <joerg@pkgsrc.org>2010-04-20 21:22:38 +0000
commit84bee4addfb911dfac32dc72adb0e4a6ee18dc32 (patch)
treeba3ab705961d034c90607278b3bd72a0ad6c24d2 /pkgtools/pkg_install
parent09e3550685b320ce9e22745fec2f3a1ff789b06e (diff)
downloadpkgsrc-84bee4addfb911dfac32dc72adb0e4a6ee18dc32.tar.gz
pkg_install-20100421:
Fix an off-by-one in the check for properly sized pkgdb entries. It rejected perfectly valid entries.
Diffstat (limited to 'pkgtools/pkg_install')
-rw-r--r--pkgtools/pkg_install/files/lib/pkgdb.c6
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/pkgtools/pkg_install/files/lib/pkgdb.c b/pkgtools/pkg_install/files/lib/pkgdb.c
index 0d9244b9d09..5e7df9a9b57 100644
--- a/pkgtools/pkg_install/files/lib/pkgdb.c
+++ b/pkgtools/pkg_install/files/lib/pkgdb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pkgdb.c,v 1.38 2010/04/14 18:24:58 joerg Exp $ */
+/* $NetBSD: pkgdb.c,v 1.39 2010/04/20 21:22:38 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: pkgdb.c,v 1.38 2010/04/14 18:24:58 joerg Exp $");
+__RCSID("$NetBSD: pkgdb.c,v 1.39 2010/04/20 21:22:38 joerg Exp $");
/*-
* Copyright (c) 1999-2010 The NetBSD Foundation, Inc.
@@ -184,7 +184,7 @@ pkgdb_retrieve(const char *key)
if (status)
return NULL;
eos = memchr(vald.data, 0, vald.size);
- if (eos == NULL || eos != (char *)vald.data + vald.size) {
+ if (eos == NULL || eos + 1 != (char *)vald.data + vald.size) {
if (!corruption_warning) {
warnx("pkgdb corrupted, please run ``pkg_admin rebuild''");
corruption_warning = 1;
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 98f1af6fbab..1a4927de84d 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.154 2010/04/20 00:39:13 joerg Exp $ */
+/* $NetBSD: version.h,v 1.155 2010/04/20 21:22:38 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION 20100420
+#define PKGTOOLS_VERSION 20100421
#endif /* _INST_LIB_VERSION_H_ */