Whamcloud - gitweb
b=23009 Fix access past end of buffer in fsoptions_to_mdt_flags()
authorRicardo M. Correia <ricardo.correia@oracle.com>
Mon, 5 Jul 2010 14:39:53 +0000 (14:39 +0000)
committerRobert Read <robert.read@oracle.com>
Tue, 6 Jul 2010 17:25:55 +0000 (10:25 -0700)
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

lustre/mdt/mdt_handler.c

index a28aaed..bb61110 100644 (file)
@@ -4450,6 +4450,9 @@ static void fsoptions_to_mdt_flags(struct mdt_device *m, char *options)
                         LCONSOLE_INFO("Disabling ACL\n");
                 }
 
                         LCONSOLE_INFO("Disabling ACL\n");
                 }
 
+                if (!*p)
+                        break;
+
                 options = ++p;
         }
 }
                 options = ++p;
         }
 }