Skip to content

Commit

Permalink
src tool_doswin
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Apr 29, 2024
1 parent 2edece8 commit 136f4f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tool_doswin.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ SANITIZEcode msdosify(char **const sanitized, const char *file_name,
/* Support for Windows 9X VFAT systems, when available. */
if(_use_lfn(file_name)) {
illegal_aliens = illegal_chars_w95;
len -= (illegal_chars_w95 - illegal_chars_dos);
len -= (size_t)(illegal_chars_w95 - illegal_chars_dos);
}

/* Get past the drive letter, if any. */
Expand Down Expand Up @@ -435,7 +435,7 @@ SANITIZEcode msdosify(char **const sanitized, const char *file_name,
specifically truncating a filename suffixed by an alternate data stream
or truncating the entire filename is not allowed. */
if(!(flags & SANITIZE_ALLOW_TRUNCATE) || strpbrk(s, "\\/:") ||
truncate_dryrun(dos_name, d - dos_name))
truncate_dryrun(dos_name, (size_t)(d - dos_name)))
return SANITIZE_ERR_INVALID_PATH;
}

Expand Down

0 comments on commit 136f4f3

Please sign in to comment.