Prevent task prolog buffer overflow

Prevent a possible buffer overflow if the task prolog output
exceeds 4096 bytes.