diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-12-09 11:10:32 +0000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-01-20 20:12:41 -0500 |
commit | 7a0e4048bfd16848ac115b17f49a3df7993a2fac (patch) | |
tree | 395ea3f02aad93a1e767ef65c8460385417df1bf /fs/adfs | |
parent | ffc8df347e4934c8bad776f7bdacb4842620b0c7 (diff) | |
download | linux-stable-7a0e4048bfd16848ac115b17f49a3df7993a2fac.tar.gz linux-stable-7a0e4048bfd16848ac115b17f49a3df7993a2fac.tar.bz2 linux-stable-7a0e4048bfd16848ac115b17f49a3df7993a2fac.zip |
fs/adfs: newdir: improve directory validation
Check that the lastmask and reserved fields are all zero, as per the
documentation.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs')
-rw-r--r-- | fs/adfs/dir_f.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index 196706d581bf..ebe8616ee533 100644 --- a/fs/adfs/dir_f.c +++ b/fs/adfs/dir_f.c @@ -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) || |