Do not allocate buffer data when size is zero