!225 告警处理

Merge pull request !225 from liumingyue/master
This commit is contained in:
openharmony_ci 2024-07-19 08:24:45 +00:00 committed by Gitee
commit c7e2fef25b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -273,6 +273,7 @@ AppProvisionVerifyResult ParseProvision(const std::string& appProvision, Provisi
{
cJSON* obj = cJSON_Parse(appProvision.c_str());
if (obj == NULL || !cJSON_IsObject(obj)) {
cJSON_Delete(obj);
return PROVISION_INVALID;
}
from_json(obj, info);
@ -386,6 +387,7 @@ AppProvisionVerifyResult ParseProfile(const std::string& appProvision, Provision
{
cJSON* jsonObj = cJSON_Parse(appProvision.c_str());
if (jsonObj == NULL || !cJSON_IsObject(jsonObj)) {
cJSON_Delete(jsonObj);
return PROVISION_INVALID;
}
from_json(jsonObj, info);

View File

@ -260,8 +260,9 @@ void HapCertVerifyOpensslUtils::WriteX509CrlToStream(std::ofstream& crlFile, X50
crlFile.seekp(posStart + sizeof(totalLen));
char buf[OPENSSL_READ_CRL_LEN_EACH_TIME];
int32_t readLen = BIO_read(derBio, buf, sizeof(buf));
int32_t readTime = 0;
while (readLen > 0 && (++readTime < OPENSSL_READ_CRL_MAX_TIME)) {
int32_t readTime = 1;
while (readLen > 0 && (readTime < OPENSSL_READ_CRL_MAX_TIME)) {
readTime++;
crlFile.write(buf, readLen);
totalLen += readLen;
readLen = BIO_read(derBio, buf, sizeof(buf));