|
|
@@ -28,6 +28,7 @@ const char* TEXT_QRFILE = "Filetype: QRCode\n"
|
|
|
#define FILE_KLEN 256
|
|
|
#define FILE_SLEN 512
|
|
|
#define FILE_MAX_PATH_LEN 48
|
|
|
+#define FILE_MAX_QRFILE_CONTENT 90
|
|
|
const char* FILE_HSTR = "fb01";
|
|
|
const char* FILE_K1 = "fb0131d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a"
|
|
|
"baefe6d9ceb651842260e0d1e05e3b90d15e7d5ffaaabc0207bf200a117793a2";
|
|
|
@@ -40,8 +41,8 @@ bool flipbip_load_file(char* settings, const FlipBipFile file_type, const char*
|
|
|
} else if(file_type == FlipBipFileDat) {
|
|
|
path = FLIPBIP_DAT_PATH;
|
|
|
} else {
|
|
|
- char path_buf[32] = {0};
|
|
|
- strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER);
|
|
|
+ char path_buf[FILE_MAX_PATH_LEN] = {0};
|
|
|
+ strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
|
|
|
strcpy(path_buf + strlen(path_buf), "/");
|
|
|
strcpy(path_buf + strlen(path_buf), file_name);
|
|
|
path = path_buf;
|
|
|
@@ -95,8 +96,8 @@ bool flipbip_has_file(const FlipBipFile file_type, const char* file_name, const
|
|
|
} else if(file_type == FlipBipFileDat) {
|
|
|
path = FLIPBIP_DAT_PATH;
|
|
|
} else {
|
|
|
- char path_buf[32] = {0};
|
|
|
- strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER);
|
|
|
+ char path_buf[FILE_MAX_PATH_LEN] = {0};
|
|
|
+ strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
|
|
|
strcpy(path_buf + strlen(path_buf), "/");
|
|
|
strcpy(path_buf + strlen(path_buf), file_name);
|
|
|
path = path_buf;
|
|
|
@@ -178,7 +179,7 @@ bool flipbip_save_qrfile(
|
|
|
const char* qr_msg_prefix,
|
|
|
const char* qr_msg_content,
|
|
|
const char* file_name) {
|
|
|
- char qr_buf[90] = {0};
|
|
|
+ char qr_buf[FILE_MAX_QRFILE_CONTENT] = {0};
|
|
|
strcpy(qr_buf, TEXT_QRFILE);
|
|
|
strcpy(qr_buf + strlen(qr_buf), qr_msg_prefix);
|
|
|
strcpy(qr_buf + strlen(qr_buf), qr_msg_content);
|