CVS commit: src/usr.sbin/btpand

2024-06-03 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Jun  4 06:24:58 UTC 2024

Modified Files:
src/usr.sbin/btpand: btpand.c

Log Message:
Fix off-by-one bug in btpand

`ul` reaches `__arraycount(services)` before the bound-check happens, causing 
undefined behaviour.

from Dapeng Gao  via FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btpand/btpand.c

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

Modified files:

Index: src/usr.sbin/btpand/btpand.c
diff -u src/usr.sbin/btpand/btpand.c:1.8 src/usr.sbin/btpand/btpand.c:1.9
--- src/usr.sbin/btpand/btpand.c:1.8	Wed May 18 13:56:32 2022
+++ src/usr.sbin/btpand/btpand.c	Tue Jun  4 06:24:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: btpand.c,v 1.8 2022/05/18 13:56:32 andvar Exp $	*/
+/*	$NetBSD: btpand.c,v 1.9 2024/06/04 06:24:58 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008-2009 Iain Hibbert
@@ -27,7 +27,7 @@
 
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008-2009 Iain Hibbert. All rights reserved.");
-__RCSID("$NetBSD: btpand.c,v 1.8 2022/05/18 13:56:32 andvar Exp $");
+__RCSID("$NetBSD: btpand.c,v 1.9 2024/06/04 06:24:58 plunky Exp $");
 
 #include 
 
@@ -155,11 +155,14 @@ main(int argc, char *argv[])
 
 		case 's': /* service */
 		case 'S': /* service (no SDP) */
-			for (ul = 0; strcasecmp(optarg, services[ul].type); ul++) {
-if (ul == __arraycount(services))
-	errx(EXIT_FAILURE, "%s: unknown service", optarg);
+			for (ul = 0; ul < __arraycount(services); ul++) {
+if (strcasecmp(optarg, services[ul].type) == 0)
+	break;
 			}
 
+			if (ul == __arraycount(services))
+errx(EXIT_FAILURE, "%s: unknown service", optarg);
+
 			if (ch == 's') {
 service_type = services[ul].type;
 service_name = services[ul].name;



CVS commit: src/usr.sbin/btpand

2024-06-03 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Jun  4 06:24:58 UTC 2024

Modified Files:
src/usr.sbin/btpand: btpand.c

Log Message:
Fix off-by-one bug in btpand

`ul` reaches `__arraycount(services)` before the bound-check happens, causing 
undefined behaviour.

from Dapeng Gao  via FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btpand/btpand.c

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



Re: CVS commit: src/distrib/sets/lists

2024-06-03 Thread Christos Zoulas
In article <20240603184723.c745cf...@cvs.netbsd.org>,
Taylor R Campbell  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  riastradh
>Date:  Mon Jun  3 18:47:23 UTC 2024
>
>Modified Files:
>   src/distrib/sets/lists/base32: ad.aarch64 md.sparc64
>   src/distrib/sets/lists/comp: ad.aarch64
>   src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
>   ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
>   md.sparc64
>   src/distrib/sets/lists/debug64: ad.mips64eb ad.mips64el
>
>Log Message:
>Take a whack at fixing the compat32 set lists for clang build.
>
>This really needs to be automatically derived from the main set
>lists; all this copypasta is a maintenance nightmare and I doubt I
>got everything after an hour of tweaking.

Yes, this all needs to be automated or reverted. It is a waste of
time and error-prone to manually have to edit what can be automatically
generated. The clang builds have been broken for more than a month,
and I did not bother to fix them because it is a waste of manual labor.
Then Taylor wasted his time fixing them. Is there a due date by which
all should be fixed or reverted? I propose July 1st.

christos



CVS commit: src/distrib/sets/lists

2024-06-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun  3 18:47:23 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.aarch64 md.sparc64
src/distrib/sets/lists/comp: ad.aarch64
src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/distrib/sets/lists/debug64: ad.mips64eb ad.mips64el

Log Message:
Take a whack at fixing the compat32 set lists for clang build.

This really needs to be automatically derived from the main set
lists; all this copypasta is a maintenance nightmare and I doubt I
got everything after an hour of tweaking.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.aarch64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/md.sparc64
cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/comp/ad.aarch64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug32/ad.aarch64 \
src/distrib/sets/lists/debug32/ad.powerpc64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/debug32/ad.mips64eb \
src/distrib/sets/lists/debug32/ad.mips64el \
src/distrib/sets/lists/debug32/ad.mipsn64eb \
src/distrib/sets/lists/debug32/ad.mipsn64el \
src/distrib/sets/lists/debug32/ad.riscv64 \
src/distrib/sets/lists/debug32/md.sparc64
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/debug32/md.amd64
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug64/ad.mips64eb \
src/distrib/sets/lists/debug64/ad.mips64el

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

Modified files:

Index: src/distrib/sets/lists/base32/ad.aarch64
diff -u src/distrib/sets/lists/base32/ad.aarch64:1.4 src/distrib/sets/lists/base32/ad.aarch64:1.5
--- src/distrib/sets/lists/base32/ad.aarch64:1.4	Mon May  6 08:38:51 2024
+++ src/distrib/sets/lists/base32/ad.aarch64	Mon Jun  3 18:47:23 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.4 2024/05/06 08:38:51 mrg Exp $
+# $NetBSD: ad.aarch64,v 1.5 2024/06/03 18:47:23 riastradh Exp $
 ./lib/eabi	base-compat-shlib	compat
 ./lib/eabi/npf	base-compat-shlib	compat,npf
 ./lib/eabi/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -99,6 +99,9 @@
 ./usr/lib/eabi/libarchive.so			base-compat-shlib	compat
 ./usr/lib/eabi/libarchive.so.5			base-compat-shlib	compat
 ./usr/lib/eabi/libarchive.so.5.0		base-compat-shlib	compat
+./usr/lib/eabi/libarm.so			base-compat-shlib	compat,pic
+./usr/lib/eabi/libarm.so.0			base-compat-shlib	compat,pic
+./usr/lib/eabi/libarm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/eabi/libasan.so			base-compat-shlib	compat,gcc,cxx
 ./usr/lib/eabi/libasan.so.5			base-compat-shlib	compat,gcc,cxx
 ./usr/lib/eabi/libasan.so.5.0			base-compat-shlib	compat,gcc,cxx
@@ -134,9 +137,15 @@
 ./usr/lib/eabi/libbz2.so			base-compat-shlib	compat
 ./usr/lib/eabi/libbz2.so.1			base-compat-shlib	compat
 ./usr/lib/eabi/libbz2.so.1.1			base-compat-shlib	compat
+./usr/lib/eabi/libc++.so			base-compat-shlib	compat,libcxx
+./usr/lib/eabi/libc++.so.1			base-compat-shlib	compat,libcxx
+./usr/lib/eabi/libc++.so.1.0			base-compat-shlib	compat,libcxx
 ./usr/lib/eabi/libc.sobase-compat-shlib	compat
 ./usr/lib/eabi/libc.so.12			base-compat-shlib	compat
 ./usr/lib/eabi/libc.so.12.221			base-compat-shlib	compat
+./usr/lib/eabi/libc_vfp.so			base-compat-shlib	compat,softfloat
+./usr/lib/eabi/libc_vfp.so.0			base-compat-shlib	compat,softfloat
+./usr/lib/eabi/libc_vfp.so.0.0			base-compat-shlib	compat,softfloat
 ./usr/lib/eabi/libcbor.so			base-compat-shlib	compat
 ./usr/lib/eabi/libcbor.so.0			base-compat-shlib	compat
 ./usr/lib/eabi/libcbor.so.0.5			base-compat-shlib	compat
@@ -149,6 +158,9 @@
 ./usr/lib/eabi/libcrypto.so			base-compat-shlib	compat
 ./usr/lib/eabi/libcrypto.so.15			base-compat-shlib	compat
 ./usr/lib/eabi/libcrypto.so.15.0		base-compat-shlib	compat
+./usr/lib/eabi/libctf.so			base-compat-shlib	compat,ctf
+./usr/lib/eabi/libctf.so.3			base-compat-shlib	compat,ctf
+./usr/lib/eabi/libctf.so.3.0			base-compat-shlib	compat,ctf
 ./usr/lib/eabi/libcurses.so			base-compat-shlib	compat
 ./usr/lib/eabi/libcurses.so.9			base-compat-shlib	compat
 ./usr/lib/eabi/libcurses.so.9.1		base-compat-shlib	compat
@@ -601,6 +613,9 @@
 ./usr/lib/eabihf/libarchive.so			base-compat-shlib	compat
 ./usr/lib/eabihf/libarchive.so.5			base-compat-shlib	compat
 ./usr/lib/eabihf/libarchive.so.5.0		base-compat-shlib	compat
+./usr/lib/eabihf/libarm.so			base-compat-shlib	compat,pic
+./usr/lib/eabihf/libarm.so.0			base-compat-shlib	compat,pic
+./usr/lib/eabihf/libarm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/eabihf/libasan.so			base-compat-shlib	compat,gcc,cxx
 ./usr/lib/eabihf/libasan.so.5			base-compat-shlib	compat,gcc,cxx
 ./usr/lib/eabihf/libasan.so.5.0			base-compat-shlib	compat,gcc,cxx
@@ -636,9 +651,15 @@
 ./usr/lib/eabihf/libbz2.so			base-compat-shlib	compat
 ./usr/lib/eabihf/libbz2.so.1			base-compat-shlib	compat
 ./usr/lib/e

CVS commit: src/distrib/sets/lists

2024-06-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun  3 18:47:23 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.aarch64 md.sparc64
src/distrib/sets/lists/comp: ad.aarch64
src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/distrib/sets/lists/debug64: ad.mips64eb ad.mips64el

Log Message:
Take a whack at fixing the compat32 set lists for clang build.

This really needs to be automatically derived from the main set
lists; all this copypasta is a maintenance nightmare and I doubt I
got everything after an hour of tweaking.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.aarch64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/md.sparc64
cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/comp/ad.aarch64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug32/ad.aarch64 \
src/distrib/sets/lists/debug32/ad.powerpc64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/debug32/ad.mips64eb \
src/distrib/sets/lists/debug32/ad.mips64el \
src/distrib/sets/lists/debug32/ad.mipsn64eb \
src/distrib/sets/lists/debug32/ad.mipsn64el \
src/distrib/sets/lists/debug32/ad.riscv64 \
src/distrib/sets/lists/debug32/md.sparc64
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/debug32/md.amd64
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug64/ad.mips64eb \
src/distrib/sets/lists/debug64/ad.mips64el

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



CVS commit: src/external/gpl2/mkhybrid/dist

2024-06-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun  3 15:55:05 UTC 2024

Modified Files:
src/external/gpl2/mkhybrid/dist: write.c

Log Message:
Don't print progress if -quiet is specfied as cdrtools-2.01 and later.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/write.c

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

Modified files:

Index: src/external/gpl2/mkhybrid/dist/write.c
diff -u src/external/gpl2/mkhybrid/dist/write.c:1.1 src/external/gpl2/mkhybrid/dist/write.c:1.2
--- src/external/gpl2/mkhybrid/dist/write.c:1.1	Fri May 31 19:49:02 2024
+++ src/external/gpl2/mkhybrid/dist/write.c	Mon Jun  3 15:55:05 2024
@@ -280,7 +280,8 @@ static void FDECL3(write_one_file, char 
 	   fprintf(stderr,"%d..", last_extent_written);
 	  }
 #else
-	  if((last_extent_written % 5000) < use/SECTOR_SIZE)
+	  if(verbose > 0 &&
+	 (last_extent_written % 5000) < use/SECTOR_SIZE)
 	  {
 	   time_t now;
 	   time_t the_end;



CVS commit: src/external/gpl2/mkhybrid/dist

2024-06-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun  3 15:55:05 UTC 2024

Modified Files:
src/external/gpl2/mkhybrid/dist: write.c

Log Message:
Don't print progress if -quiet is specfied as cdrtools-2.01 and later.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/write.c

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



CVS commit: src/external/gpl2/mkhybrid/dist

2024-06-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun  3 14:38:55 UTC 2024

Modified Files:
src/external/gpl2/mkhybrid/dist: mkhybrid.8

Log Message:
Also pull man page description of options pulled from mkisofs-1.13.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/mkhybrid.8

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

Modified files:

Index: src/external/gpl2/mkhybrid/dist/mkhybrid.8
diff -u src/external/gpl2/mkhybrid/dist/mkhybrid.8:1.1 src/external/gpl2/mkhybrid/dist/mkhybrid.8:1.2
--- src/external/gpl2/mkhybrid/dist/mkhybrid.8:1.1	Fri May 31 19:49:02 2024
+++ src/external/gpl2/mkhybrid/dist/mkhybrid.8	Mon Jun  3 14:38:55 2024
@@ -46,6 +46,9 @@ mkhybrid \- create an hybrid ISO9660/JOL
 .B \-D
 ]
 [
+.B \-graft-points
+]
+[
 .B \-hide
 .I glob
 ]
@@ -62,6 +65,12 @@ mkhybrid \- create an hybrid ISO9660/JOL
 .I file
 ]
 [
+.B \-hide-joliet-trans-tbl
+]
+[
+.B \-hide-rr-moved
+]
+[
 .B \-J
 ]
 [
@@ -344,7 +353,10 @@ mkhybrid
 will merge the files found in all of the specified path components to form the cdrom
 image.
 .PP
-It is possible to graft the paths at points other than the root
+If the option
+.I \-graft-points
+has been specified, 
+it is possible to graft the paths at points other than the root
 directory, and it is possible to graft files or directories onto the
 cdrom image with names different than what they have in the source filesystem.  This is
 easiest to illustrate with a couple of examples.   Let's start by assuming that a local
@@ -479,6 +491,14 @@ Follow symbolic links when generating th
 in use, symbolic links will be entered using Rock Ridge if enabled, otherwise
 the file will be ignored.
 .TP
+.B \-graft-points
+Allow to use graft points for filenames. If this option is used, all filenames
+are checked for graft points. The filename is divided at the first unescaped
+equal sign. All occurrences of '' and '=' characters must be escaped with ''
+if 
+.I \-graft-points
+has been specified.
+.TP
 .BI \-hide " glob
 Hide
 .I glob
@@ -521,6 +541,34 @@ A file containing a list of
 .I globs
 to be hidden as above.
 .TP
+.B \-hide-joliet-trans-tbl
+Hide the
+.B TRANS.TBL
+files from the Joliet tree.
+These files usually don't make sense in the Joliet World as they list
+the real name and the ISO9660 name which may both be different from the
+Joliet name.
+.TP
+.B \-hide-rr-moved
+Rename the directory
+.B RR_MOVED
+to
+.B .rr_moved
+in the Rock Ridge tree.
+It seems to be impossible to completely hide the
+.B RR_MOVED
+directory from the Rock Ridge tree.
+This option only makes the visible tree better to understand for
+people who don't know what this directory is for.
+If you need to have no
+.B RR_MOVED
+directory at all, you should use the
+.B \-D
+option. Note that in case that the
+.B \-D
+option has been specified, the resulting filesystem is not ISO9660
+level-1 compliant and will not be readable on MS-DOS.
+.TP
 .B \-l
 Allow full 32 character filenames.  Normally the ISO9660 filename will be in an
 8.3 format which is compatible with MS-DOS, even though the ISO9660 standard



CVS commit: src/external/gpl2/mkhybrid/dist

2024-06-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun  3 14:38:55 UTC 2024

Modified Files:
src/external/gpl2/mkhybrid/dist: mkhybrid.8

Log Message:
Also pull man page description of options pulled from mkisofs-1.13.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/mkhybrid.8

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