添加校验循环边界 Signed-off-by:xiongqiao3@huawei.com

Signed-off-by: xiongqiao <xiongqiao3@huawei.com>
This commit is contained in:
xiongqiao 2023-06-15 15:12:38 +08:00
parent a850df0115
commit f1e4cb147b
2 changed files with 2 additions and 0 deletions

View File

@ -148,6 +148,7 @@ bool PrinterCapability::ReadFromParcel(Parcel &parcel)
if (hasResolution_) {
std::vector<PrintResolution> resolutionList;
vecSize = parcel.ReadUint32();
CHECK_IS_EXCEED_PRINT_RANGE_BOOL(vecSize);
for (uint32_t index = 0; index < vecSize; index++) {
auto resolutionPtr = PrintResolution::Unmarshalling(parcel);
if (resolutionPtr == nullptr) {

View File

@ -5,6 +5,7 @@
"name": 3707,
"libpath": "libprint_service.z.so",
"run-on-create": false,
"auto-restart": true,
"distributed": false,
"dump_level": 1
}