]> git.proxmox.com Git - mirror_qemu.git/commitdiff
9p: null terminate fs driver options list
authorPrasad J Pandit <pjp@fedoraproject.org>
Thu, 9 Jul 2020 17:58:48 +0000 (23:28 +0530)
committerGreg Kurz <groug@kaod.org>
Fri, 10 Jul 2020 10:48:06 +0000 (12:48 +0200)
NULL terminate fs driver options' list, validate_opt() looks for
a null entry to terminate the loop.

Fixes: aee7f3ecd8b7 ("fsdev: Error out when unsupported option is passed")
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200709175848.650400-1-ppandit@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
fsdev/qemu-fsdev.c

index a9e069c0c78d8075caea939a8664be34442120f0..3da64e9f72b4a7cd44b8ad1cdba288cb6db41667 100644 (file)
@@ -78,6 +78,7 @@ static FsDriverTable FsDrivers[] = {
             "throttling.iops-read-max-length",
             "throttling.iops-write-max-length",
             "throttling.iops-size",
+            NULL
         },
     },
     {
@@ -85,6 +86,7 @@ static FsDriverTable FsDrivers[] = {
         .ops = &synth_ops,
         .opts = (const char * []) {
             COMMON_FS_DRIVER_OPTIONS,
+            NULL
         },
     },
     {
@@ -95,6 +97,7 @@ static FsDriverTable FsDrivers[] = {
             "socket",
             "sock_fd",
             "writeout",
+            NULL
         },
     },
 };