pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Fri Jan 26 12:40:04 UTC 2024

Modified Files:
        pkgsrc/mk/pkgformat/pkg: pkgformat-vars.mk
        pkgsrc/pkgtools/pkg_install: Makefile
        pkgsrc/pkgtools/pkg_install/files/add: parse_cross.c
        pkgsrc/pkgtools/pkg_install/files/lib: version.h

Log Message:
pkg_install: Fix mistake in previous: this is strchr, not strchrnul.

Either

        if ((q = strchr(p, '/')) == NULL)

or

        if (*(q = strchrnul(p, '/')) == '\0')

will work, but not

        if (*(q = strchr(p, '/')) == '\0')

which will crash with a null pointer dereference.  Let's get the
right version of this committed, not the wrong one!  Oops.

While here, reset PKGREVISION like I meant to do yesterday.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk
cvs rdiff -u -r1.238 -r1.239 pkgsrc/pkgtools/pkg_install/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c
cvs rdiff -u -r1.190 -r1.191 pkgsrc/pkgtools/pkg_install/files/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk
diff -u pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk:1.15 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk:1.16
--- pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk:1.15      Fri Jan 26 03:24:58 2024
+++ pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk   Fri Jan 26 12:40:04 2024
@@ -1,4 +1,4 @@
-# $NetBSD: pkgformat-vars.mk,v 1.15 2024/01/26 03:24:58 riastradh Exp $
+# $NetBSD: pkgformat-vars.mk,v 1.16 2024/01/26 12:40:04 riastradh Exp $
 #
 # This Makefile fragment is included indirectly by bsd.prefs.mk and
 # defines some variables which must be defined earlier than where
@@ -41,7 +41,7 @@ NATIVE_LINKFARM_CMD?=         ${NATIVE_PKG_TOOL
 
 # Latest versions of tools required for correct pkgsrc operation.
 .if ${USE_CROSS_COMPILE:tl} == "yes"
-PKGTOOLS_REQD=         20240125
+PKGTOOLS_REQD=         20240126
 .elif !empty(USE_PKG_ADMIN_DIGEST:M[Yy][Ee][Ss])
 PKGTOOLS_REQD=         20191008
 .else

Index: pkgsrc/pkgtools/pkg_install/Makefile
diff -u pkgsrc/pkgtools/pkg_install/Makefile:1.238 pkgsrc/pkgtools/pkg_install/Makefile:1.239
--- pkgsrc/pkgtools/pkg_install/Makefile:1.238  Wed Jan  3 12:32:59 2024
+++ pkgsrc/pkgtools/pkg_install/Makefile        Fri Jan 26 12:40:04 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.238 2024/01/03 12:32:59 gdt Exp $
+# $NetBSD: Makefile,v 1.239 2024/01/26 12:40:04 riastradh Exp $
 
 # Notes to package maintainers:
 #
@@ -7,7 +7,6 @@
 # change in the pkg_* tools that pkgsrc relies on for proper operation.
 
 PKGNAME=               pkg_install-${VERSION}
-PKGREVISION=           2
 CATEGORIES=            pkgtools
 
 MAINTAINER=            agc%NetBSD.org@localhost

Index: pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c
diff -u pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c:1.1 pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c:1.2
--- pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c:1.1     Fri Jan 26 03:24:49 2024
+++ pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c Fri Jan 26 12:40:04 2024
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse_cross.c,v 1.1 2024/01/26 03:24:49 riastradh Exp $        */
+/*     $NetBSD: parse_cross.c,v 1.2 2024/01/26 12:40:04 riastradh Exp $        */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: parse_cross.c,v 1.1 2024/01/26 03:24:49 riastradh Exp $");
+__RCSID("$NetBSD: parse_cross.c,v 1.2 2024/01/26 12:40:04 riastradh Exp $");
 
 #include "lib.h"
 #include "add.h"
@@ -34,7 +34,7 @@ parse_cross(const char *text, char **mac
        /*
         * If there's no /, treat it as a single MACHINE_ARCH.
         */
-       if (*(q = strchr(p, '/')) == '\0') {
+       if ((q = strchr(p, '/')) == NULL) {
                *machine_arch = copy;
                *opsys = NULL;
                *os_version = NULL;

Index: pkgsrc/pkgtools/pkg_install/files/lib/version.h
diff -u pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.190 pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.191
--- pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.190       Fri Jan 26 03:24:49 2024
+++ pkgsrc/pkgtools/pkg_install/files/lib/version.h     Fri Jan 26 12:40:04 2024
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.190 2024/01/26 03:24:49 riastradh Exp $  */
+/*     $NetBSD: version.h,v 1.191 2024/01/26 12:40:04 riastradh 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 20240125
+#define PKGTOOLS_VERSION 20240126
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index