pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/pkg_install/files



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Sat Feb 28 09:49:35 UTC 2026

Modified Files:
        pkgsrc/pkgtools/pkg_install/files/add: parse_cross.c
        pkgsrc/pkgtools/pkg_install/files/lib: version.h

Log Message:
pkg_install: fix null pointer dereference

The pkg_add -m option crashes on null pointer dereference if the input has a
slash but then no space.

Patch by riastradh@ in PR pkg/59991.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c
cvs rdiff -u -r1.201 -r1.202 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/pkgtools/pkg_install/files/add/parse_cross.c
diff -u pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c:1.3 pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c:1.4
--- pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c:1.3     Tue Jun 11 09:11:33 2024
+++ pkgsrc/pkgtools/pkg_install/files/add/parse_cross.c Sat Feb 28 09:49:35 2026
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse_cross.c,v 1.3 2024/06/11 09:11:33 wiz Exp $      */
+/*     $NetBSD: parse_cross.c,v 1.4 2026/02/28 09:49:35 bsiegert 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.3 2024/06/11 09:11:33 wiz Exp $");
+__RCSID("$NetBSD: parse_cross.c,v 1.4 2026/02/28 09:49:35 bsiegert Exp $");
 
 #if HAVE_ERR_H
 #include <err.h>
@@ -51,7 +51,7 @@ parse_cross(const char *text, char **mac
                /*
                 * If there's no SPC, fail.
                 */
-               if (*(r = strchr(q, ' ')) == '\0') {
+               if ((r = strchr(q, ' ')) == NULL) {
                        goto fail;
                }
 

Index: pkgsrc/pkgtools/pkg_install/files/lib/version.h
diff -u pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.201 pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.202
--- pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.201       Thu Apr 17 21:29:35 2025
+++ pkgsrc/pkgtools/pkg_install/files/lib/version.h     Sat Feb 28 09:49:35 2026
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.201 2025/04/17 21:29:35 wiz Exp $        */
+/*     $NetBSD: version.h,v 1.202 2026/02/28 09:49:35 bsiegert 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 20250417
+#define PKGTOOLS_VERSION 20260227
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index