Correct check for net_crypto packet index.

This commit is contained in:
Evgeny Kurnevsky 2018-06-25 10:00:40 +03:00 committed by iphydf
parent b9a75d98b2
commit 52f21e3251
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -727,7 +727,7 @@ static uint32_t num_packets_array(const Packets_Array *array)
*/
static int add_data_to_buffer(const Logger *log, Packets_Array *array, uint32_t number, const Packet_Data *data)
{
if (number - array->buffer_start > CRYPTO_PACKET_BUFFER_SIZE) {
if (number - array->buffer_start >= CRYPTO_PACKET_BUFFER_SIZE) {
return -1;
}