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: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -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' % (
|
||||
|
||||
Reference in New Issue
Block a user