Skip to content

Commit

Permalink
fix (cbor parsing): error handling for errors during cbor decode in u…
Browse files Browse the repository at this point in the history
…nion

Signed-off-by: Krzysztof Szromek <[email protected]>
  • Loading branch information
kszromek-nordic committed Oct 23, 2023
1 parent d04923b commit 35d7a1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion suit_generator/suit/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ def from_cbor(cls, cbstr):
try:
value = child.from_cbor(cbstr)
break
except ValueError:
except (ValueError, MemoryError, cbor2.CBORError):
# fixme: need to be improved (detect possible MemoryError prior to occurring) - NCSDK-24195
pass
else:
raise ValueError("Not possible to deserialize data")
Expand Down

0 comments on commit 35d7a1f

Please sign in to comment.