Fix to use snprintf() instead of memcpy()