X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=fs%2Ffs_context.c;h=24ce12f0db32e5779d389ebcc8c49e9b35ecb9e0;hb=1aec955ed5f4d7a4562a28c5117f59d37b5390f9;hp=b7e43a780a625bca1b0faeba53e2702463ad0496;hpb=dd4703876ea83b5fb5f4f0a1ec58f786143f5064;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/fs/fs_context.c b/fs/fs_context.c index b7e43a7..24ce12f 100644 --- a/fs/fs_context.c +++ b/fs/fs_context.c @@ -548,7 +548,7 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param) param->key); } - if (len > PAGE_SIZE - 2 - size) + if (size + len + 2 > PAGE_SIZE) return invalf(fc, "VFS: Legacy: Cumulative options too large"); if (strchr(param->key, ',') || (param->type == fs_value_is_string &&