Init the array that will hold copy.
Move buffer size calculation to where it is really attached.