未验证 提交 64c0e20f 编写于 作者: L lishengming14 提交者: Gitee

update services/dbinder/dbinder_service/src/dbinder_service.cpp.

IPC UT测试阻塞用例修改,整形溢出检查导致正常溢出流程出现崩溃
Signed-off-by: Nlishengming14 <lishengming14@h-partners.com>
上级 cb3e1f9e
......@@ -162,7 +162,10 @@ sptr<DBinderService> DBinderService::GetInstance()
uint32_t DBinderService::GetSeqNumber()
{
std::lock_guard<std::mutex> lockGuard(instanceMutex_);
seqNumber_++; // can be overflow
if (seqNumber_ == std::numeric_limits<uint32_t>::max()) {
seqNumber_ = 0;
}
seqNumber_++;
return seqNumber_;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册