Check if output buffer allocation succeeds before using it. Follows existing pattern from deflatedData check on line 141.