Skip to content

Commit 744d838

Browse files
authored
Merge pull request libgit2#4805 from libgit2/signed_char
path validation: `char` is not signed by default.
2 parents 2dd88a5 + 4429186 commit 744d838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ GIT_INLINE(bool) verify_dotgit_ntfs_generic(const char *name, size_t len, const
16621662
saw_tilde = 1;
16631663
} else if (i >= 6) {
16641664
return true;
1665-
} else if (name[i] < 0) {
1665+
} else if ((unsigned char)name[i] > 127) {
16661666
return true;
16671667
} else if (git__tolower(name[i]) != shortname_pfix[i]) {
16681668
return true;

0 commit comments

Comments
 (0)