///////////////////////////////////////////////////////
| 570 | |
| 571 | //////////////////////////////////////////////////////////// |
| 572 | bool Packet::checkSize(std::size_t size) |
| 573 | { |
| 574 | // Determine if size is big enough to trigger an overflow |
| 575 | const bool overflowDetected = m_readPos + size < m_readPos; |
| 576 | m_isValid = m_isValid && (m_readPos + size <= m_data.size()) && !overflowDetected; |
| 577 | |
| 578 | return m_isValid; |
| 579 | } |
| 580 | |
| 581 | |
| 582 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no outgoing calls
no test coverage detected