1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-08 13:28:05 +00:00
freebsd/usr.sbin/bsdinstall
Devin Teske 82ac9f2bf7 Use snprintf(3) in place of unbounded sprintf(3) (prevent buffer overflow).
Use adequately sized buffer for error(s) (512 -> PATH_MAX + 512).
Fix the following style(9) nits while here:
- distfetch.c uses PATH_MAX while distextract.c uses MAXPATHLEN;
  standardize on one (PATH_MAX)
- Move $FreeBSD$ from comment to __FBSDID()
- Sort included headers (alphabetically, sys/* at top)
- Add missing header includes (e.g., <stdlib.h> for getenv(3),
  calloc(3)/malloc(3)/free(3), and atoi(3); <string.h> for strdup(3),
  strrchr(3), strsep(3), and strcmp(3); <ctype.h> for isspace(3); and
  <unistd.h> for chdir(2), etc.)
- Remove rogue newline at end of distfetch.c
- Don't declare variables in if-, while-, or other statement
NB: To prevent masking of prior declarations atop function
- Perform stack alignment for variable declarations
- Add missing function prototype for count_files() in distextract.c
- Break out single-line multivariable-declarations
NB: Aligning similarly-named variables with one-char difference(s)
NB: Minimizes diffs and makes future diffs more clear
- Use err(3) family of functions (requires s/int err;/int retval;/g)

Reviewed by:	nwhitehorn, julian
2014-09-29 00:35:12 +00:00
..
distextract Use snprintf(3) in place of unbounded sprintf(3) (prevent buffer overflow). 2014-09-29 00:35:12 +00:00
distfetch Use snprintf(3) in place of unbounded sprintf(3) (prevent buffer overflow). 2014-09-29 00:35:12 +00:00
partedit Add ZFS support to the bsdinstall partition editor and sade. 2014-09-13 18:24:54 +00:00
scripts Change the /var dataset in the default ZFS layout to have the 2014-09-28 21:44:23 +00:00
bsdinstall Forgot to utilize feature added in SVN r257782 to prevent truncating 2013-12-09 03:38:18 +00:00
bsdinstall.8 More man pages that need to know about vt in addition to syscons. 2014-08-26 10:55:08 +00:00
Makefile Long-overdue man page for bsdinstall. 2011-06-11 21:44:07 +00:00