Alexander Couzens has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84188?usp=email )
Change subject: spdtool: ignore utf-8 errors when decoding manufactorer ......................................................................
spdtool: ignore utf-8 errors when decoding manufactorer
Fix early failures when filling it with invalid data.
Change-Id: I7dfec2a67d7c46459fb96c752f2eb8caafb68fa2 Signed-off-by: Alexander Couzens lynxis@fe80.eu --- M util/spdtool/spdtool.py 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/84188/1
diff --git a/util/spdtool/spdtool.py b/util/spdtool/spdtool.py index 89976ea..aa25fad 100644 --- a/util/spdtool/spdtool.py +++ b/util/spdtool/spdtool.py @@ -148,7 +148,7 @@ if offset + 0x15c >= len(self.blob): return "" tmp = self.blob[offset + 0x149:offset + 0x15c + 1] - return tmp.decode('utf-8').rstrip() + return tmp.decode('utf-8', 'ignore').rstrip()
def get_manufacturer_id(self, offset): """Return manufacturer ID"""