| 152 | } |
| 153 | |
| 154 | inline void UpdateReversHashState(uint32_t state_index, uint32_t len, const void* buffer, uint32_t buffer_len) |
| 155 | { |
| 156 | assert(state_index != 0); |
| 157 | ReverseHashEntry& entry = m_HashStates[state_index]; |
| 158 | size_t length = entry.m_Length + buffer_len; |
| 159 | entry.m_Value = realloc(entry.m_Value, DM_ALIGN(length + 1, 16) + 16); |
| 160 | uint8_t* p = (uint8_t*) entry.m_Value; |
| 161 | memcpy(&p[entry.m_Length], buffer, buffer_len); |
| 162 | p[length] = '\0'; |
| 163 | entry.m_Length = length; |
| 164 | } |
| 165 | |
| 166 | }; |
| 167 |
no test coverage detected