Files
yzy-15 71db7608b3 fix: resolve 32 code review issues from form_fwk audit
Concurrency fixes:
- P1-1: atTimerWakeUpTime_ change to std::atomic<int64_t>
- P1-2: reportDiskUseTimerId_ change to std::atomic<uint64_t>
- P1-3: merge HasRouterProxy check and map access into single lock scope
- P1-4: unsubscribe common event before clearing event handles map
- P1-5: remove death recipients before clearing in FormProxyRegistry destructor
- P1-7: limiterTimerReportId_ change to std::atomic<uint64_t>
- P1-8: protect CreateLimiterTimer check-create-store with mutex, validate CreateTimer return
- P1-9: hasCachedConfig_ change to std::atomic<bool>
- P1-10: isInitialized_ change to std::atomic<bool>, add lock in Init()
- P1-11: add mutex lock in LoadDataFromDb

Input validation fixes:
- P2-1/P2-2/P2-3: add size check before StringUtils::split[1] access
- P2-4: validate float params in FormSurfaceInfo::ReadFromParcel
- P2-5: add hour/minute range validation in UpdateTimerValue
- P2-6: check GetOsAccountLocalIdFromUid return value
- P2-7: add empty string check for callerBundleName
- P2-8: check GetFormLock return value, fail-closed
- P2-9: add callerToken null check in SetFormAddObserver/SetFormRemoveObserver
- P2-10: check GetFormRecord return value in AcquireProviderFormInfo

Integer/type fixes:
- P3-1: add errno check in ConvertStringToLongLong
- P3-2: add overflow check in ConvertStringToInt
- P3-3: change NANO_PER_SECOND to int64_t

Null pointer/uninitialized fixes:
- P4-1: add connect parameter null check in ConnectServiceAbilityWithUserId
- P4-2: initialize castFormsCount to 0

Resource management fixes:
- P5-1: check PushFormEvent return value in AddTaskToQueuePush
- P5-2: return false on runtime Init/InsertHapPath failure
- P5-3: replace shared_from_this with raw pointer in FormShareMgr destructor

Dead code removal:
- P7-1: remove unused IsDynamicTimerExpired with self-deadlock risk

Permission check:
- P6-1: add caller identity verification in UpdateSubscribeFormData

Low-risk fixes:
- P8-1: check RegisterBundleEventCallback return value
- P8-2: same as P3-2

Documentation:
- F4/F5: add lock behavior comments for DeleteRenderRecordByUid and SetCriticalFalseOnAllFormInvisible

AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%]
Co-authored-by: opencode (glm-5.2) <ai@local>

Change-Id: I07c6b44bedb54aae4f3706ca2376ebee13b04bc5
Signed-off-by: yzy-15 <yuzhiyong6@h-partners.com>
2026-08-21 14:59:31 +08:00
..
2026-07-18 11:34:22 +08:00
2026-02-26 11:26:33 +08:00