Skip to content

Commit cc4c9df

Browse files
authored
Merge pull request #60 from lesamouraipourpre/length-data-type-check
Add a check on the length of the datatype
2 parents 6fa737e + e98fd75 commit cc4c9df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_gps.py

+2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ def update(self):
248248
if self.debug:
249249
print(sentence)
250250
data_type, args = sentence
251+
if len(data_type) < 5:
252+
return False
251253
data_type = bytes(data_type.upper(), "ascii")
252254
(talker, sentence_type) = _parse_talker(data_type)
253255

0 commit comments

Comments
 (0)