安全告警整改

Signed-off-by: lichao <lichao74@huawei.com>
This commit is contained in:
openharmony_ci
2024-04-16 16:34:40 +08:00
committed by lichao
parent a9ff6f5b73
commit e73f3fc77b
3 changed files with 23 additions and 4 deletions
+4
View File
@@ -119,6 +119,10 @@ bool EncodePrivateSyscap(char **output, int *outputLen)
return false;
}
if (bufferLen < (PCID_MAIN_BYTES + 1) || bufferLen > INT32_MAX) {
PRINT_ERR("Parameter bufferLen out of range.");
return false;
}
uint32_t priLen = bufferLen - PCID_MAIN_BYTES - 1;
if ((int)priLen <= 0) {
*outputLen = 0;