diff options
author | joerg <joerg@pkgsrc.org> | 2010-04-20 21:22:38 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-04-20 21:22:38 +0000 |
commit | 684c872df96374fb278cab02d20f5068e6ab05c7 (patch) | |
tree | ba3ab705961d034c90607278b3bd72a0ad6c24d2 /pkgtools | |
parent | cb9eae102b012b358fecf288dcbd26eb304c8dd4 (diff) | |
download | pkgsrc-684c872df96374fb278cab02d20f5068e6ab05c7.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')
-rw-r--r-- | pkgtools/pkg_install/files/lib/pkgdb.c | 6 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/version.h | 4 |
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_ */ |