Commit 7a0e4048 authored by Russell King's avatar Russell King Committed by Al Viro

fs/adfs: newdir: improve directory validation

Check that the lastmask and reserved fields are all zero, as per the
documentation.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ffc8df34
......@@ -127,6 +127,7 @@ static int adfs_f_validate(struct adfs_dir *dir)
struct adfs_newdirtail *tail = dir->newtail;
if (head->startmasseq != tail->endmasseq ||
tail->dirlastmask || tail->reserved[0] || tail->reserved[1] ||
(memcmp(&head->startname, "Nick", 4) &&
memcmp(&head->startname, "Hugo", 4)) ||
memcmp(&head->startname, &tail->endname, 4) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment