Skip to content

Commit 216ed73

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

can/io/canutils.py

+3
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)