Browse code

Add NULL check in cli_isnumber

Andrew authored on 2019/11/09 04:25:42
Showing 1 changed files
... ...
@@ -898,6 +898,10 @@ size_t cli_ldbtokenize(char *buffer, const char delim, const size_t token_count,
898 898
 
899 899
 int cli_isnumber(const char *str)
900 900
 {
901
+    if (NULL == str) {
902
+        return 0;
903
+    }
904
+
901 905
     while(*str)
902 906
 	if(!strchr("0123456789", *str++))
903 907
 	    return 0;