Files
codeql/cpp/ql/src/Likely Bugs/Conversion/LossyPointerCast.cpp
2018-09-23 16:23:52 -07:00

6 lines
161 B
C++

void f(char *p) {
int my_ptr = p; //Wrong: pointer assigned to int, would be incorrect if sizeof(char*)
//is larger than sizeof(int)
//...
}