Set the correct size snprintf, fixing the memset issues