add sanity check on output buffer size for BuildMessage()