Bug 86842 - 【data】新增apn时apn_name、username、password、apn_type设置为最大长度会导致程序卡死,data无法再初始化

Change-Id: I4585073f90d582f675ace01255a587e30f5052b9
diff --git a/mbtk/include/lynq/lynq-qser-data.h b/mbtk/include/lynq/lynq-qser-data.h
old mode 100755
new mode 100644
index 35c4cd9..a480312
--- a/mbtk/include/lynq/lynq-qser-data.h
+++ b/mbtk/include/lynq/lynq-qser-data.h
@@ -43,9 +43,9 @@
 } qser_apn_auth_proto_e;
 
 #define QSER_APN_MAX_LIST 8
-#define QSER_APN_NAME_SIZE 150
-#define QSER_APN_USERNAME_SIZE 127
-#define QSER_APN_PASSWORD_SIZE 127
+#define QSER_APN_NAME_SIZE 150+1
+#define QSER_APN_USERNAME_SIZE 127+1
+#define QSER_APN_PASSWORD_SIZE 127+1
 
 struct v4_address_status {
 	struct in_addr ip;                    /*!< Public IPv4 address. */
diff --git a/mbtk/include/mbtk/mbtk_info_api.h b/mbtk/include/mbtk/mbtk_info_api.h
old mode 100755
new mode 100644
index 61e08bd..00150ef
--- a/mbtk/include/mbtk/mbtk_info_api.h
+++ b/mbtk/include/mbtk/mbtk_info_api.h
@@ -31,6 +31,13 @@
 #define MBTK_APN_CID_MAX 7
 #define MBTK_DATA_CALL_TIMEOUT_DEFAULT 10  // 10s
 
+#define MBTK_APN_NAME_SIZE 150+1
+#define MBTK_APN_USERNAME_SIZE 127+1
+#define MBTK_APN_PASSWORD_SIZE 127+1
+#define MBTK_APN_TYPE_SIZE 127+1
+
+
+
 typedef void (*mbtk_info_callback_func)(const void* data, int data_len);
 
 typedef enum {
@@ -514,11 +521,11 @@
 	                                             established with this profile. */ 
 	mbtk_apn_req_type_enum req_type;          /*!< apn req type*/
 	mbtk_apn_auth_proto_enum auth_proto;         /*!< Authentication Protocol. */
-	uint8 apn_name[150];        /*!< A string parameter that is a logical name used to select the GGSN
+	uint8 apn_name[MBTK_APN_NAME_SIZE];        /*!< A string parameter that is a logical name used to select the GGSN
 	                                             and external packet data network. */ 
-	uint8 user_name[127];    /*!< Username used during data network authentication. */
-	uint8 user_pass[127];    /*!< Password to be used during data network authentication. */
-    uint8 apn_type[127];
+	uint8 user_name[MBTK_APN_USERNAME_SIZE];    /*!< Username used during data network authentication. */
+	uint8 user_pass[MBTK_APN_PASSWORD_SIZE];    /*!< Password to be used during data network authentication. */
+    uint8 apn_type[MBTK_APN_TYPE_SIZE];
 } mbtk_qser_apn_info_s;
 /**************qser data_call*****************/