We have not checked the problem when it is removed because it was implementedI've told you on previous mail. This function should return validatedchecksum.- /* validiate cached dentries */
- for (i = 1; i < num_entries; i++) {
- ep = exfat_get_dentry_cached(es, i);
- if (!exfat_validate_entry(exfat_get_entry_type(ep), &mode))
+ ep = exfat_get_dentry_cached(es, ENTRY_STREAM);
+ if (!ep || ep->type != EXFAT_STREAM)
+ goto free_es;
+ es->de[ENTRY_STREAM] = ep;
The value contained in stream-ext dir-entry should not be used
before validating the EntrySet
So I would insert EntrySet checksum validation here.Yes. That would be great.
In that case, the checksum verification loop would be followed by
the TYPE_NAME verification loop, can you acceptable?
OK.
I'll add TYPE_NAME verification after checksum verification, in next patch.
However, I think it is enough to validate TYPE_NAME when extracting name.
Could you please tell me why you think you need TYPE_NAME validation here?
dentry set after checking
file->stream->name in sequence.
Yes. I understand that the current implementation checks in that order.
Sorry, my question was unclear.
Why do you think you should leave the TYPE_NAME validation in this function?
What kind of problem are you worried about if this function does not validate TYPE_NAME?
(for preserve the current behavior?)
according to the specification from the beginning.
And your v3 patch are
already checking the name entries as TYPE_SECONDARY. And it check them with
TYPE_NAME again in exfat_get_uniname_from_ext_entry().
If you check TYPE_NAME
with stream->name_len, We don't need to perform the loop for extracting
filename from the name entries if stream->name_len or name entry is invalid.
And I request to prove why we do not need to validate name entries in this
function calling from somewhere.
So as I suggested earlier, You can make it
with an argument flags so that we skip the validation.