Potential undefined behavior when calling Remote::list()
When calling Remote::list() for a remote of a git repository, when that remote does not advertise any references, git2 passes a null pointer to the unsafe function slice::from_raw_parts(). Based on the safety section documentation of function, data must be non-null even for slices of length zero. Thus, the use of a null pointer leads to undefined behavior.
See advisory page for additional details.
git20.20.4When calling
Remote::list()for a remote of a git repository, when that remote does not advertise any references, git2 passes a null pointer to the unsafe functionslice::from_raw_parts(). Based on the safety section documentation of function, data must be non-null even for slices of length zero. Thus, the use of a null pointer leads to undefined behavior.See advisory page for additional details.