iter: set *length to zero upon failure.