We calloc() buffer for attribute, but better always set na->crypto to NULL
explicitly just for any case
edge.strict_endians
Yura Pakhuchiy 2007-09-20 14:21:28 +03:00
parent c0e8e211f3
commit 038fea1b5b
1 changed files with 1 additions and 2 deletions

View File

@ -1349,11 +1349,11 @@ int ntfs_crypto_attr_open(ntfs_attr *na)
ntfs_fek *fek;
int i;
na->crypto = NULL;
if (!na || !NAttrEncrypted(na)) {
errno = EINVAL;
return -1;
}
if (ntfs_crypto_init()) {
errno = EACCES;
return -1;
@ -1370,7 +1370,6 @@ int ntfs_crypto_attr_open(ntfs_attr *na)
}
}
na->crypto = NULL;
errno = EACCES;
return -1;
}