Avoid integer overflow when checking buffer bounds

Found by Chris Evans
1 file changed