handle reading error from input stream

My tweak encounters a zero headerLen frequently and a negative-one headerLen occasionally. 
This patch prevents libobjcipc from crashing the hooked app (including SpringBoard).