Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CacheVC::openWriteCloseDir: fix metric array indexing (#10682)
The fragment_document_count is an array of size 3. Our logic for accessing it was supposed to clamp indexing into it between values 0 through 2, but accidentally allowed indexing outside of that range. This resulted in an out of bounds index into random memory. This fixes the logic to properly clamp to the appropriate values. For reference here's the old logic before our recent Metrics change: https://github.com/apache/trafficserver/pull/10175/files#diff-6ac65bcc29d9196567a0bbff3c7aa6705ebb7a6041f4a5706b6b475202d4934dL1200
- Loading branch information