ソースを参照

Uninitialised pointer is passing a null pointer check. Ends up in a SEGFAULT in set_timeout_state()

Ryan Doyle 11 年 前
コミット
b37b918dba
1 ファイル変更1 行追加1 行削除
  1. 1 1
      plugins/utils.c

+ 1 - 1
plugins/utils.c

@@ -188,7 +188,7 @@ parse_timeout_string (char *timeout_str)
 {
 {
 	char *seperated_str;
 	char *seperated_str;
         char *timeout_val = "";
         char *timeout_val = "";
-	char *timeout_sta;
+	char *timeout_sta = NULL;
         if ( strstr(timeout_str, ":" ) == NULL) {
         if ( strstr(timeout_str, ":" ) == NULL) {
 		timeout_val = timeout_str;
 		timeout_val = timeout_str;
         } else if ( strncmp(timeout_str, ":", 1 ) == 0) {
         } else if ( strncmp(timeout_str, ":", 1 ) == 0) {