vector.c
7.92 KB
-
vector: do not reverse a vector if it is empty · f47db3c7
The code reversing a vector initially determines the rear-pointer by simply subtracting 1 from the vector's length. Obviously, this fails if the vector is empty, in which case we have an integer overflow. Fix the issue by returning early if the vector is empty.
Patrick Steinhardt committed