Skip to content

Commit 363128f

Browse files
geoffw0mchammer01
andauthored
Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent e4cadf0 commit 363128f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rust/ql/src/queries/security/CWE-825/AccessInvalidPointer.qhelp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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
99
causing the program to crash or behave incorrectly, in some cases exposing the program to
1010
potential attacks.
1111
</p>
@@ -17,7 +17,7 @@ potential attacks.
1717
When dereferencing a pointer in <code>unsafe</code> code, take care that the pointer is valid and
1818
points to the intended data. Code may need to be rearranged or additional checks added to ensure
1919
safety 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
3636
comes before the call to <code>std::ptr::drop_in_place</code>:
3737
</p>
3838

rust/ql/src/queries/security/CWE-825/AccessInvalidPointer.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

0 commit comments

Comments
 (0)