Files
codeql/cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow-good.cpp
2019-11-14 15:21:26 -08:00

3 lines
90 B
C++

bool not_in_range(T *ptr, T *ptr_end, size_t i) {
return i >= ptr_end - ptr; // GOOD
}