From 097480f08544f25ff6e15a7d904d929c460a2d52 Mon Sep 17 00:00:00 2001
From: Sourabh Chandak <sourabh3934@gmail.com>
Date: Sun, 25 Mar 2012 09:24:23 +0530
Subject: [PATCH] Cheetah: segf on config retrieval fixed
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.7.5.4"

This is a multi-part message in MIME format.
--------------1.7.5.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 plugins/cheetah/cmd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


--------------1.7.5.4
Content-Type: text/x-patch; name="0001-Cheetah-segf-on-config-retrieval-fixed.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Cheetah-segf-on-config-retrieval-fixed.patch"

diff --git a/plugins/cheetah/cmd.c b/plugins/cheetah/cmd.c
index b3a8e7c..9fb4a8f 100644
--- a/plugins/cheetah/cmd.c
+++ b/plugins/cheetah/cmd.c
@@ -312,7 +312,7 @@ void mk_cheetah_cmd_config()
     CHEETAH_WRITE("\n-------------------");
     CHEETAH_WRITE("\nServer Port     : %i", mk_api->config->serverport);
     
-    if (strcmp(mk_api->config->listen_addr, "0.0.0.0") == 0) {
+    if (!mk_api->config->listen_addr || strcmp(mk_api->config->listen_addr, "0.0.0.0") == 0) {
         CHEETAH_WRITE("\nListen          : All interfaces");
     }
     else {

--------------1.7.5.4--


