File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
rust/ql/src/queries/security/CWE-825 Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 55<overview >
66
77<p >
8- Dereferencing an invalid or dangling pointer is undefined behavior. Memory may be corrupted
8+ Dereferencing an invalid or dangling pointer may cause undefined behavior. Memory may be corrupted
99causing the program to crash or behave incorrectly, in some cases exposing the program to
1010potential attacks.
1111</p >
@@ -17,7 +17,7 @@ potential attacks.
1717When dereferencing a pointer in <code >unsafe</code > code, take care that the pointer is valid and
1818points to the intended data. Code may need to be rearranged or additional checks added to ensure
1919safety in all circumstances. If possible, rewrite the code using safe Rust types to avoid this
20- class of problems altogether.
20+ kind of problems altogether.
2121</p >
2222
2323</recommendation >
@@ -32,7 +32,7 @@ undefined behavior:
3232<sample src =" AccessInvalidPointerBad.rs" />
3333
3434<p >
35- In this case undefined behavior can be avoided by rearranging the code so that the dereference
35+ In this case, undefined behavior can be avoided by rearranging the code so that the dereferencing
3636comes before the call to <code >std::ptr::drop_in_place</code >:
3737</p >
3838
Original file line number Diff line number Diff line change 11/**
22 * @name Access of invalid pointer
3- * @description Dereferencing an invalid or dangling pointer is undefined behavior and may cause memory corruption.
3+ * @description Dereferencing an invalid or dangling pointer causes undefined behavior and may result in memory corruption.
44 * @kind path-problem
55 * @problem.severity error
66 * @security-severity 7.5
You can’t perform that action at this time.
0 commit comments