[PATCH v3 1/8] vsh: Fix NULL dereference leading to SIGSEGV if a command is missing '.info'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 tools/vsh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index 4ee472c..3772d92 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -695,7 +695,7 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
         }
         fputc('\n', stdout);
 
-        if (desc[0]) {
+        if (desc && *desc) {
             /* Print the description only if it's not empty.  */
             fputs(_("\n  DESCRIPTION\n"), stdout);
             fprintf(stdout, "    %s\n", _(desc));
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]