Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent an OOB read in
expand_dims.cc
The for loop that follows this check assumes that `axis` is between `0` and `input_dims.size`. If user supplied `axis` is negative, the if code before this check is supposed to bring it back to positive (similar to how in Python one can do `l[-3]` to mean `l[-3 + len(l)]`). PiperOrigin-RevId: 387200206 Change-Id: I162f4feba12d547c3a4340833ae682016a2ebfab
- Loading branch information