pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/lib pkg_install: carry over...
details: https://anonhg.NetBSD.org/pkgsrc/rev/07e32535d28b
branches: trunk
changeset: 443420:07e32535d28b
user: wiz <wiz%pkgsrc.org@localhost>
date: Sat Dec 12 19:25:19 2020 +0000
description:
pkg_install: carry over bugfix from src
christos: Don't try to memcpy (size_t)-1 bytes!
diffstat:
pkgtools/pkg_install/files/lib/plist.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diffs (44 lines):
diff -r e85ec217a2e8 -r 07e32535d28b pkgtools/pkg_install/files/lib/plist.c
--- a/pkgtools/pkg_install/files/lib/plist.c Sat Dec 12 16:41:13 2020 +0000
+++ b/pkgtools/pkg_install/files/lib/plist.c Sat Dec 12 19:25:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plist.c,v 1.31 2020/09/07 23:46:42 wiz Exp $ */
+/* $NetBSD: plist.c,v 1.32 2020/12/12 19:25:19 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: plist.c,v 1.31 2020/09/07 23:46:42 wiz Exp $");
+__RCSID("$NetBSD: plist.c,v 1.32 2020/12/12 19:25:19 wiz Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
@@ -637,15 +637,16 @@
fail = FAIL;
goto pkgdb_cleanup;
}
- }
- memcpy(&buf[SymlinkHeaderLen], tmp2, cc);
- buf[SymlinkHeaderLen + cc] = 0x0;
- if (strcmp(buf, p->next->name) != 0) {
- printf("symlink %s is not same as recorded value, %s: %s\n",
- buf, Force ? "deleting anyway" : "not deleting", tmp);
- if (!Force) {
- fail = FAIL;
- goto pkgdb_cleanup;
+ } else {
+ memcpy(&buf[SymlinkHeaderLen], tmp2, cc);
+ buf[SymlinkHeaderLen + cc] = 0x0;
+ if (strcmp(buf, p->next->name) != 0) {
+ printf("symlink %s is not same as recorded value, %s: %s\n",
+ buf, Force ? "deleting anyway" : "not deleting", tmp);
+ if (!Force) {
+ fail = FAIL;
+ goto pkgdb_cleanup;
+ }
}
}
}
Home |
Main Index |
Thread Index |
Old Index