summaryrefslogtreecommitdiff
path: root/src/tsg_entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tsg_entry.cpp')
-rw-r--r--src/tsg_entry.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp
index c19b82f..7128002 100644
--- a/src/tsg_entry.cpp
+++ b/src/tsg_entry.cpp
@@ -42,7 +42,7 @@ static __attribute__((__used__)) const char * GIT_VERSION_UNKNOWN = NULL;
#endif
-char TSG_MASTER_VERSION_20200612=0;
+char TSG_MASTER_VERSION_20200624=0;
const char *tsg_conffile="tsgconf/main.conf";
g_tsg_para_t g_tsg_para;
@@ -73,7 +73,7 @@ static int tsg_get_sn(char *filename, char *device_sn, int device_sn_len)
if(object)
{
cJSON *item=cJSON_GetObjectItem(object, "sn");
- if(item && device_sn_len>(int)strlen(item->valuestring))
+ if(item && item->valuestring!=NULL && device_sn_len>(int)strlen(item->valuestring))
{
flags=1;
memcpy(device_sn, item->valuestring, strlen(item->valuestring));