End effects during the binding of protein to linear DNA fragments