handle buffer overruns