Skip to content

Commit 216ed73

Browse files
Kai Oberbeckmannhardbyte
authored andcommitted
Initialized dataBin in canutils with None to prevent crashes when reading remote frames (hardbyte#713)
1 parent c93a2e0 commit 216ed73

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

can/io/canutils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ def __iter__(self):
5656

5757
if data and data[0].lower() == "r":
5858
isRemoteFrame = True
59+
5960
if len(data) > 1:
6061
dlc = int(data[1:])
6162
else:
6263
dlc = 0
64+
65+
dataBin = None
6366
else:
6467
isRemoteFrame = False
6568

0 commit comments

Comments
 (0)