utils: fix integer overflow with DURATION_MAX_READ_SIZE