use memcpy instead of strcpy, as this is not a string

(side effect of silencing coverity)
use memcpy instead of strncpy on non-string data