History log of /openbsd-current/sbin/fsck_msdos/dir.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_6_2_BASE
# 1.31 27-Jun-2017 jsg

Avoid the possibility of accessing an array out of bounds.
Found with cppcheck. ok krw@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.30 10-Dec-2015 mmcc

Remove NULL-checks before free(). ok tb@


# 1.29 20-Aug-2015 deraadt

<stdlib.h> is included, so do not need to cast result from
malloc, calloc, realloc*
ok krw millert


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.28 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


# 1.27 18-Nov-2014 krw

Nuke some obvious #include duplications.

ok espie@ deraadt@ millert@ tedu@


Revision tags: OPENBSD_5_6_BASE
# 1.26 11-Jul-2014 tobias

Remove redundant check and wrong fix: fat.c checks already take care
about cluster chains. If the user didn't want to fix them at that time,
he asks for trouble -- and these checks didn't help in all cases either.

discussed with and ok krw@


# 1.25 10-Jul-2014 tobias

Avoid out of boundary access when checking invalid long filenames.

Addressed by NetBSD in revision 1.24, but instead of ignoring the filename,
consider it invalid -- because it is.

ok krw@, tedu@


# 1.24 09-Jul-2014 tobias

Merge memory leak fix from NetBSD's dir.c revision 1.20, but actually
release all reserved memory chunks in all error cases.

with input by and ok tedu@, ok deraadt@


# 1.23 18-Jun-2014 tobias

Always keep length of cluster chain up to date, otherwise the drop of
superfluous clusters can lead to out of boundary access.

ok krw@


# 1.22 16-Jun-2014 tobias

Merge NetBSD commit:
Move to 2 clause license, approved by Wolfgang Solfrank.

ok deraadt@, krw@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.21 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.20 27-May-2006 thib

newline fix + s/perror/xperror since we are
using a home rolled version.

ok pedro@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.19 17-Jul-2004 deraadt

some ansi; khalek@linuxgamers.net


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.18 29-Jul-2003 deraadt

spaces


# 1.17 30-Mar-2003 deraadt

snprintf


Revision tags: OPENBSD_3_3_BASE
# 1.16 13-Mar-2003 deraadt

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.15 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.14 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_3_0_BASE
# 1.13 07-Jul-2001 deraadt

major -Wall cleanup, almost complete


# 1.12 03-Jul-2001 ian

Put missing \n's in som error messages; consolidate redundant "if" (OK theo@).


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.11 06-Sep-1999 espie

Corrected overflow logic in fullpath.

<subliminal FreeBSD/NetBSD>Oh yeah, baby, you want that one</subliminal :->


# 1.10 30-Aug-1999 espie

Fix obvious logic error (from netbsd)


Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.9 11-Jan-1998 provos

FAT32 support from NetBSD by Wolfgang Solfrank.


Revision tags: OPENBSD_2_2_BASE
# 1.8 11-Sep-1997 deraadt

from ws@netbsd; Fix a few bugs, especially when repairing disks:
Print correct pathname in error messages
Fix unterminating loop when trying to correct a bad fat
Require fat media byte to be the same as the one in the bpb
Fix unterminating loop when looking for free directory slot in LOST.DIR
(bad disk image provided by Christoph Badura)


Revision tags: OPENBSD_2_1_BASE
# 1.7 02-Mar-1997 millert

Update based on latest NetBSD version.
Now uses functions from util.[ch] instead of local ones.
Also some anal KNF from me...


# 1.6 28-Feb-1997 millert

From NetBSD (ws)
Fix handling of clusters marked bad; Noted by Rafal Boni


Revision tags: OPENBSD_2_0_BASE
# 1.5 18-Sep-1996 mickey

"prs are sometimes wrong" (theo)
fix wrong fix. "kak v zadnitsu kol, russkiy rock-n-roll" (4epHeuKuu)


# 1.4 17-Sep-1996 deraadt

realpath fix, do not dump; pr#2765, david@mono.org


# 1.3 23-Jun-1996 deraadt

update rcsid


# 1.2 10-Jun-1996 deraadt

from ws;
Check return values of malloc
Generate full pathnames only on request
Minor cleanup, RCS Ids in .h files
Don't allocate data structures for non-directories
Free any data structures when finishing a check (at the latest)


# 1.1 22-May-1996 deraadt

add fsck_msdos