|
@@ -590,7 +590,7 @@ int login_lan_config_read(const char *lancfgName) {
|
|
* @return 0:success, 1:failure (file not found|readable)
|
|
* @return 0:success, 1:failure (file not found|readable)
|
|
*/
|
|
*/
|
|
int login_config_read(const char* cfgName) {
|
|
int login_config_read(const char* cfgName) {
|
|
- char line[1024], w1[1024], w2[1024];
|
|
|
|
|
|
+ char line[1024], w1[32], w2[1024];
|
|
FILE* fp = fopen(cfgName, "r");
|
|
FILE* fp = fopen(cfgName, "r");
|
|
if (fp == NULL) {
|
|
if (fp == NULL) {
|
|
ShowError("Configuration file (%s) not found.\n", cfgName);
|
|
ShowError("Configuration file (%s) not found.\n", cfgName);
|
|
@@ -600,7 +600,7 @@ int login_config_read(const char* cfgName) {
|
|
if (line[0] == '/' && line[1] == '/')
|
|
if (line[0] == '/' && line[1] == '/')
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- if (sscanf(line, "%1023[^:]: %1023[^\r\n]", w1, w2) < 2)
|
|
|
|
|
|
+ if (sscanf(line, "%31[^:]: %1023[^\r\n]", w1, w2) < 2)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
if(!strcmpi(w1,"timestamp_format"))
|
|
if(!strcmpi(w1,"timestamp_format"))
|