[llvm] [Support] Added checks to ULEB128/SLEB128 decoding routines checks for pointer past the end of the buffer (PR #89843)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 11:23:59 PDT 2024


dwblaikie wrote:

In this case I'd think an assert is more appropriate - it's a reasonable precondition of these functions that `p < end` - and I /think/ violating that precondition is the only way to reach the updated condition you've created? Or is there some way the algorithm itself can, starting from that precondition, end up in the state of `p > end` without going through `p == end`/stopping there?

https://github.com/llvm/llvm-project/pull/89843


More information about the llvm-commits mailing list