Replace all uses of strcpy*, strcat* with memcpy

Memcpy is always faster than any of these function when the size
to copy is known, which is always the case in this code.

In addition, most of the previous calls were vulnerable to race
conditions, where the attacker would set the final zero byte of
the string to a non-zero value after the call to strlen and
before the call to strcpy, strcpy_s, strcat or strcat_s. It's not
clear whether this was exploitable or not, but I think we should
fix this no matter what.

Google internal cl: 531243392

Change-Id: Idb7b345f27ef0c85958269f4ad75bc06316ba066
2 files changed