rossengeorgiev / aprs-python

📡 Python module for working with APRS
http://aprs-python.readthedocs.io/en/latest/
GNU General Public License v2.0
118 stars 37 forks source link

UI frame of death crashes aprslib #54

Closed stroobandt closed 5 years ago

stroobandt commented 5 years ago

There is only one automatic APRS station out there that manages to crash aprslib with the following UI frame of death:

APRS Packet: b'CA2JAT-7>SPP20W,WIDE1-1,WIDE2-1,qAS,CA2JAT-10:`bFll \x1c[/`1200bps_$'

Traceback (most recent call last):
  File "/home/bin/ham/afeed", line 118, in <module>
    receive.consumer(callback, raw=True)
  File "/usr/local/lib/python3.6/dist-packages/aprslib/inet.py", line 183, in consumer
    callback(line)
  File "/home/bin/ham/afeed", line 79, in callback
    parsed_ui_frame = aprslib.parse(ui_frame)
  File "/usr/local/lib/python3.6/dist-packages/aprslib/parsing/__init__.py", line 114, in parse
    _try_toparse_body(packet_type, body, parsed)
  File "/usr/local/lib/python3.6/dist-packages/aprslib/parsing/__init__.py", line 186, in _try_toparse_body
    body, result = parse_mice(parsed['to'], body)
  File "/usr/local/lib/python3.6/dist-packages/aprslib/parsing/mice.py", line 195, in parse_mice
    for i in range(channels):
TypeError: 'float' object cannot be interpreted as an integer