fab: Escape size is an optimizable constant

The escape length for the string can be derived with sizeof,
which is evaluate in the preprocessor.

fab: Error handling, off-by-one for prec_strlen

The macro prec_len includes the null terminator, remove the
offset. Add some error paths, and handle some possible logic
failures.