get_leader_len: change return type to size_t