Take care when converting from pointer to integer or integer
to pointer
CERT C++ Secure Coding
INT11-CPP
Take care when converting from pointer to integer or integer
to pointer
White Box Definitions
A weakness where code path has:
1. end statement that returns an address associated with a buffer
where address is outside the buffer
2. start statement that computes a position into the buffer
References
[REF-17] Michael Howard, David LeBlanc
and John Viega. "24 Deadly Sins of Software Security". "Sin 5: Buffer Overruns." Page 89. McGraw-Hill. 2010.
Maintenance Notes
This entry should have a chaining relationship with CWE-119 instead of a parent / child relationship, however the focus of this weakness does not map cleanly to any existing entries in CWE. A new parent is being considered which covers the more generic problem of incorrect return values. There is also an abstract relationship to weaknesses in which one component sends incorrect messages to another component; in this case, one routine is sending an incorrect value to another.