File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 66
77<overview >
88<p >
9- Dereferencing a pointer after it has been deallocated may result in memory corruption which can
10- lead to security vulnerabilities.
9+ Deallocating memory more than once can lead to a double-free vulnerability. This can be exploited to
10+ corrupt the allocator's internal data structures, which can lead to denial-of-service attacks by crashing
11+ the program, or to security vulnerabilities by allowing an attacker to overwrite arbitrary memory locations.
1112</p >
1213
13- <include src =" dataFlowWarning.inc.qhelp" />
14-
1514</overview >
1615<recommendation >
1716<p >
1817Ensure that all execution paths deallocate the allocated memory at most once. If possible, reassign
19- the pointer to a null value after deallocating it. This will both prevent double-free vulnerabilities, and
20- increase the likelihood of the operating system raising a runtime error if the pointer is subsequently
21- dereferenced after being deallocated.
18+ the pointer to a null value after deallocating it. This will prevent double-free vulnerabilities since
19+ most deallocation functions will perform a null-pointer check before attempting to deallocate the memory.
2220</p >
2321
2422</recommendation >
You can’t perform that action at this time.
0 commit comments