Use more explicit way of copying pointer value to a buffer