attrib.c: Fix errno not being set on NULL character in attribute name.

This is an error condition as we jump to err_out, but there's no errno
value set to accompany it. Fixed by setting EIO.
edge
Erik Larsson 2023-05-03 09:57:34 +02:00
parent e73d481a76
commit 01b9bddc0c
1 changed files with 1 additions and 0 deletions

View File

@ -433,6 +433,7 @@ ntfs_attr *ntfs_attr_open(ntfs_inode *ni, const ATTR_TYPES type,
if (ntfs_ucsnlen(name, name_len) != name_len) {
ntfs_log_error("Null character in attribute name"
" of inode %lld\n",(long long)ni->mft_no);
errno = EIO;
goto err_out;
}
name = ntfs_ucsndup(name, name_len);