Some bits of defensive programming to prevent string buffer overflows.

6 jobs for fix-791 in 0 seconds (queued for 775 minutes and 3 seconds)