Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent an OOB read in expand_dims.cc #51322

Merged

Commits on Aug 5, 2021

  1. 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
    mihaimaruseac committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    7ee8e39 View commit details
    Browse the repository at this point in the history