diff --git a/fs/hmdfs/super.c b/fs/hmdfs/super.c index a4b1170153b373030b2fc070ebd0a2f5d342d86e..18f222c6d4ccc05293d69445981dfec6a403d685 100644 --- a/fs/hmdfs/super.c +++ b/fs/hmdfs/super.c @@ -81,7 +81,13 @@ int hmdfs_parse_options(struct hmdfs_sb_info *sbi, const char *data) unsigned int user_id = 0; struct super_block *sb = sbi->sb; int err = 0; + size_t size = 0; + size = strlen(data); + if (size >= HMDFS_PAGE_SIZE) { + return -EINVAL; + } + options = kstrdup(data, GFP_KERNEL); if (data && !options) { err = -ENOMEM;