BUG/MINOR: samples: fix unnecessary memcopy converting binary to string.

(cherry picked from commit 4b9e80268ec15f6f3db85e53a5ab9c6dbf920264)
1 file changed