File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -173,11 +173,11 @@ For example if we truncated the vector to just two elements through `v2`:
173173v2 . truncate (2 );
174174```
175175
176- and ` v1 ` were still accessible we'd end up with an invalid vector since ` v1 `
176+ and ` v ` were still accessible we'd end up with an invalid vector since ` v `
177177would not know that the heap data has been truncated. Now, the part of the
178- vector ` v1 ` on the stack does not agree with the corresponding part on the
179- heap. ` v1 ` still thinks there are three elements in the vector and will
180- happily let us access the non existent element ` v1 [2]` but as you might
178+ vector ` v ` on the stack does not agree with the corresponding part on the
179+ heap. ` v ` still thinks there are three elements in the vector and will
180+ happily let us access the non existent element ` v [2]` but as you might
181181already know this is a recipe for disaster. Especially because it might lead
182182to a segmentation fault or worse allow an unauthorized user to read from
183183memory to which they don't have access.
You can’t perform that action at this time.
0 commit comments