Release-checked element access for indices that originate off the wire. Unlike operator[]/Set/Get (whose AssertDebug compiles out under NDEBUG), this bounds-check survives in shipping builds: it returns nullptr instead of indexing out of range, so callers handling attacker-controlled indices can reject rather than read/write past it.
| 131 | // survives in shipping builds: it returns nullptr instead of indexing out of range, so |
| 132 | // callers handling attacker-controlled indices can reject rather than read/write past it. |
| 133 | Type* AtOrNull(int i) { return (i >= 0 && i < _n) ? &_data[i] : nullptr; } |
| 134 | const Type* AtOrNull(int i) const { return (i >= 0 && i < _n) ? &_data[i] : nullptr; } |
| 135 | const Type* Data() const { return _data; } |
| 136 | Type* Data() { return _data; } |
no outgoing calls
no test coverage detected