mirror of
https://opendev.org/x/pyghmi
synced 2025-01-14 03:37:47 +00:00
Abort MAC decode from FRU if not 'binary'
If the TLV says the mac data is text, then it's not going to be a good day. Abort in such a case. Change-Id: I597df429de9af516aa28868d90f31984fa2923e2
This commit is contained in:
parent
b9b9620a9d
commit
a20566f8e2
@ -464,6 +464,10 @@ class OEMHandler(generic.OEMHandler):
|
||||
macprefix = None
|
||||
while idx < endidx:
|
||||
currmac = macs[idx:idx+6]
|
||||
if not isinstance(currmac, bytearray):
|
||||
# invalid vpd format, abort attempts to extract
|
||||
# mac in this way
|
||||
break
|
||||
if currmac == b'\x00\x00\x00\x00\x00\x00':
|
||||
break
|
||||
# VPD may veer off, detect and break off
|
||||
|
Loading…
x
Reference in New Issue
Block a user