From: Ricardo M. Correia Date: Mon, 5 Jul 2010 14:39:53 +0000 (+0000) Subject: b=23009 Fix access past end of buffer in fsoptions_to_mdt_flags() X-Git-Tag: 2.0.0.51~41 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b4d8133665e7f074e0affcc05a032194087c28a0 b=23009 Fix access past end of buffer in fsoptions_to_mdt_flags() It seems fsoptions_to_mdt_flags() was accessing the "options" buffer past the end of it due to a missing check for NULL. This should fix it. i=alex.zhuravlev i=tappro --- diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index a28aaed..bb61110 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4450,6 +4450,9 @@ static void fsoptions_to_mdt_flags(struct mdt_device *m, char *options) LCONSOLE_INFO("Disabling ACL\n"); } + if (!*p) + break; + options = ++p; } }