am 678d556f: Merge "Add snprintf truncation and output error checks."

* commit '678d556f439cae504c343c15d77e9ec020a9385c':
  Add snprintf truncation and output error checks.