CVS commit: src/usr.bin/ftp

"Luke Mewburn" <[email protected]> Sat, 18 Jul 2026 09:03:53 +0000
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	lukem
Date:		Sat Jul 18 09:03:53 UTC 2026

Modified Files:
	src/usr.bin/ftp: fetch.c

Log Message:
base64_encode(): avoid reading off end of clear

Don't read clear[i+2] without bounds checking,
which can occur when (len % 3) == 1.

Issue reported in private email by "Acts1631",
and confirmed with gcc15 asan and a test harness.


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/usr.bin/ftp/fetch.c

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