|
|
|
|
|
by kelnos
811 days ago
|
|
No, that's incorrect. While yes, it's true that you can point two different nodes at the same array index, or mismanage your array indices in a variety of ways, that is a logic error. It will indeed make your program behave incorrectly (and depending on what it's doing, that may have security implications), but there is no memory safety issue. No one is using anything after freeing it; if you try to access an index that is past the end of the Vec, it will panic. Panicking, while undesirable, is memory-safe. You may think that's a difference without distinction, but "memory safety" and "use after free" have specific definitions, and this ain't them. |
|