From def141571c38423fbf921da9ec858ca53da6d94e Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 17 May 2021 23:08:20 +0200 Subject: [PATCH] get_network_info: check response length --- selfdrive/hardware/tici/hardware.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/selfdrive/hardware/tici/hardware.py b/selfdrive/hardware/tici/hardware.py index 99e8a96b27..3749eb9de1 100644 --- a/selfdrive/hardware/tici/hardware.py +++ b/selfdrive/hardware/tici/hardware.py @@ -137,8 +137,12 @@ class Tici(HardwareBase): return None if info and info.startswith('+QNWINFO: '): - info = info.replace('+QNWINFO: ', '').replace('"', '') - technology, operator, band, channel = info.split(',') + info = info.replace('+QNWINFO: ', '').replace('"', '').split(',') + + if len(info) != 4: + return None + + technology, operator, band, channel = info return({ 'technology': technology,