File tree 1 file changed +4
-4
lines changed
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`:
173
173
v2 . truncate (2 );
174
174
```
175
175
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 `
177
177
would 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
181
181
already know this is a recipe for disaster. Especially because it might lead
182
182
to a segmentation fault or worse allow an unauthorized user to read from
183
183
memory to which they don't have access.
You can’t perform that action at this time.
0 commit comments