Fix a one byte write past address_copy

The index bound was the buffer size, not the last writable index.
This commit is contained in:
noctuum
2026-09-13 08:26:40 +05:00
committed by Jari Sundell
parent 0c507c581f
commit 641626029a
+1 -1
View File
@@ -131,7 +131,7 @@ ipv4_range_parse(const char* address, uint32_t* address_start, uint32_t* address
// copy everything up to '#' to address_copy and work from there
while(address[address_start_index] != '#' && address[address_start_index] != '\r' &&
address[address_start_index] != '\n' && address[address_start_index] != '\0' &&
address_start_index < 4096 ) {
address_start_index < 4095 ) {
address_copy[address_start_index] = address[address_start_index];
address_start_index++;