/ dosfstools Public
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
Prevent out of bound array read in date_dos2unix()
The function date_dos2unix() is called during fsck while showing information about duplicate file names. In case the date field of a directory entry contains the invalid value 0 for the month, date_dos2unix would read index -1 of the day_n array. Add a check to prevent that and also make the day_n array const on this occasion. Reported-by: Hanno Böck Signed-off-by: Andreas Bombe <email@example.com>
- Loading branch information
Showing 1 changed file with 7 additions and 3 deletions.