[Tizen-submit] 19165: Changes to Tizen:2.2:Main/osp-appfw

noreply at tizen.org noreply at tizen.org
Thu Jan 2 09:51:14 GMT 2014


Hi,
Sehong Na have made the following changes to osp-appfw in project Tizen:2.2:Main. Please review and accept ASAP.

Thank You,

[This message was auto-generated]

---

Request: #19165

  submit:       Tizen:2.2:Main:build/osp-appfw(cleanup) -> Tizen:2.2:Main


Message:
Submitter: Sehong Na <sehong.na at samsung.com>
Comments: submit to obs
Git project: framework/osp/appfw
Tag: submit/tizen_2.2/20140102.095159
Commit: a874dcd442f5c27cf3ecf894429c326733e0ec9a Tizen 2.2.1

State:   new        2014-01-02T09:48:41 tizenrobot
Comment: <no comment>
spec files:
-----------
--- osp-appfw.spec
+++ osp-appfw.spec
@@ -2,7 +2,7 @@
 %define __strip /bin/true
 
 Name:       osp-appfw
-VCS:        framework/osp/appfw#647da7403fd769fc81fd07f9087a1ee0246125c1
+VCS:        framework/osp/appfw#a874dcd442f5c27cf3ecf894429c326733e0ec9a
 Summary:    The App Framework library of OSP
 Version:    1.2.2.1
 Release:    1

other changes:
--------------

++++++ osp-appfw-1.2.2.1.tar.gz
--- src/security/cert/FSecCert_CertDbManager.cpp
+++ src/security/cert/FSecCert_CertDbManager.cpp
@@ -152,7 +152,7 @@
 	char condition[_MAX_TYPE_CONST_SIZE] = {0, };
 	char installed[_MAX_TYPE_RECORD_SIZE] = "T\0";
 
-	snprintf(condition, sizeof(condition), "certType = %d and installed = '%s'", certType, installed);
+	snprintf(condition, _MAX_TYPE_CONST_SIZE, "certType = %d and installed = '%s'", certType, installed);
 
 	r = __caCertDbStore.RemoveAllCertificateByCondition(reinterpret_cast< byte* >(condition));
 	SysTryReturnResult(NID_SEC_CERT, !IsFailed(r), E_SYSTEM, "Failed to delete all the certificate tables in database.");
@@ -167,7 +167,7 @@
 	char condition[_MAX_TYPE_CONST_SIZE] = {0, };
 	char installed[_MAX_TYPE_RECORD_SIZE] = "T\0";
 
-	snprintf(condition, sizeof(condition), "certId = %d and certType = %d and installed = '%s'", certId, _CERT_TYPE_ROOT_CA_BY_USER, installed);
+	snprintf(condition, _MAX_TYPE_CONST_SIZE, "certId = %d and certType = %d and installed = '%s'", certId, _CERT_TYPE_ROOT_CA_BY_USER, installed);
 	r = __caCertDbStore.RemoveAllCertificateByCondition(reinterpret_cast< byte* >(condition));
 	SysTryReturnResult(NID_SEC_CERT, !IsFailed(r), E_SYSTEM, "Failed to delete all the certificate tables in database.");
 
@@ -227,8 +227,8 @@
 	SysTryReturnResult(NID_SEC_CERT, lenSubjectName < _MAX_ISSUER_SUBJECT_NAME_SIZE, E_SYSTEM, "Subject name is more then maximum specified length.");
 	SysTryReturnResult(NID_SEC_CERT, lenIssuerName < _MAX_ISSUER_SUBJECT_NAME_SIZE, E_SYSTEM, "Subject name is more then maximum specified length.");
 
-	snprintf(subjectName, sizeof(subjectName), "%s", reinterpret_cast< const char* >(pTbsCert->GetSubjectName()));
-	snprintf(issuerName, sizeof(issuerName), "%s", reinterpret_cast< const char* >(pTbsCert->GetIssuerName()));
+	strncpy(subjectName, reinterpret_cast< const char* >(pTbsCert->GetSubjectName()),lenSubjectName);
+	strncpy(issuerName, reinterpret_cast< const char* >(pTbsCert->GetIssuerName()),lenIssuerName);
 
 	pTbsCert->GetSerialNumber(pSerial, reinterpret_cast< int& >(lenSerialNo));
 	if ((lenSerialNo <= 0) || (lenSerialNo > _MAX_SERIAL_NUMBER_SIZE))
@@ -302,7 +302,7 @@
 	SysTryReturnResult(NID_SEC_CERT, pFileName != null, E_SYSTEM, "Failed to get file attributes.");
 
 	int len = strlen(pFileName.get());
-	snprintf(certRecord.fileName, sizeof(certRecord.fileName), "%s", pFileName.get());
+	strncpy(certRecord.fileName, pFileName.get(), len);
 
 	certRecord.subjectNameLen = lenSubjectName;
 	memcpy(certRecord.subjectName, subjectName, lenSubjectName);
@@ -379,7 +379,7 @@
 		r = _Base64::Encode(pTbsCert->GetSubjectName(), lenSubjectName, subjectNameBase64, subjNameB64len);
 		SysTryReturnResult(NID_SEC_CERT, !IsFailed(r), E_ENCODING_FAILED, "Failed to encode data in base 64 encoding.");
 
-		snprintf(condition, sizeof(condition), "subjectName = '%s' and certType = %d and installed = '%s'", subjectNameBase64, certType, installed);
+		snprintf(condition, (_MAX_ISSUER_SUBJECT_NAME_SIZE + _MAX_SUBJECT_OFFSET_SIZE), "subjectName = '%s' and certType = %d and installed = '%s'", subjectNameBase64, certType, installed);
 		r = __caCertDbStore.GetFirstRecordByConditions(reinterpret_cast< byte* >(condition), &certRecord);
 		SysTryReturn(NID_SEC_CERT, !IsFailed(r), r, r, "[%s] Failed to get certificates record.", GetErrorMessage(r));
 
@@ -399,8 +399,11 @@
 			pNewTbsCert = pNewCert->GetTbsCertInstance();
 			SysTryReturnResult(NID_SEC_CERT, pNewTbsCert != null, E_SYSTEM, "Failed to get certificate to be signed instance.");
 
-			snprintf(newSubjectName, sizeof(newSubjectName), "%s", reinterpret_cast< const char* >(pNewTbsCert->GetSubjectName()));
-			snprintf(newIssuerName, sizeof(newIssuerName), "%s", reinterpret_cast< const char* >(pNewTbsCert->GetIssuerName()));
+			lenSubjectName = strlen(reinterpret_cast< char* >(pNewTbsCert->GetSubjectName()));
+			lenIssuerName = strlen(reinterpret_cast< char* >(pNewTbsCert->GetIssuerName()));
+
+			strncpy(newSubjectName, reinterpret_cast< const char* >(pNewTbsCert->GetSubjectName()),lenSubjectName);
+			strncpy(newIssuerName, reinterpret_cast< const char* >(pNewTbsCert->GetIssuerName()),lenIssuerName);
 
 			lenNewSubjectName = strlen(newSubjectName);
 			lenNewIssuerName = strlen(newIssuerName);
@@ -427,7 +430,7 @@
 		SysTryReturnResult(NID_SEC_CERT, pFileName != null, E_OPERATION_FAILED, "Failed to get file name.");
 
 		int len = strlen(pFileName.get());
-		snprintf(certRecord1.fileName, sizeof(certRecord1.fileName), "%s", pFileName.get());

Please refer to OBS webUI for more details about this SR.


More information about the Tizen-submit mailing list