off-by-one error in allocating space for cvs fields