Commit 67e49a7f authored by Nicolai Hähnle's avatar Nicolai Hähnle

amd/common: fix off-by-one in sid_tables.py

The very last entry in the sid_strings_offsets table ended up missing,
leading to out-of-bounds reads and potential crashes.
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent b72b7c54
......@@ -110,7 +110,7 @@ class IntTable:
[static] const typename name[] = { ... };
to filp.
"""
idxs = sorted(self.idxs) + [-1]
idxs = sorted(self.idxs) + [len(self.table)]
fragments = [
('\t/* %s */ %s' % (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment