diff --git a/src/ipv4.c b/src/ipv4.c index 698bf108..46bfda6d 100644 --- a/src/ipv4.c +++ b/src/ipv4.c @@ -232,6 +232,7 @@ static int ipv4_get_route(struct rtentry *route) while (fgets(line, buffer_size - total_bytes_read - 1, fp) != NULL) { uint32_t bytes_read = strlen(line); + assert(total_bytes_read < UINT32_MAX - bytes_read); total_bytes_read += bytes_read; if (bytes_read > 0 && line[bytes_read - 1] != '\n') {