Skip to content

Commit

Permalink
Issue 15578 - assert before refcount overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jtung-apple committed Aug 23, 2022
1 parent cfdb308 commit 7628ffc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/system/SystemPacketBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ void PacketBuffer::AddRef()
pbuf_ref(this);
#else // !CHIP_SYSTEM_CONFIG_USE_LWIP
LOCK_BUF_POOL();
assert(this->ref < UINT16_MAX);
++this->ref;
UNLOCK_BUF_POOL();
#endif // !CHIP_SYSTEM_CONFIG_USE_LWIP
Expand Down

0 comments on commit 7628ffc

Please sign in to comment.