Fix a wrong memcpy in logf() introduced in r22253