summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/hciconfig.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index bbc61d0e..65512a09 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -259,7 +259,10 @@ void cmd_aclmtu(int ctl, int hdev, char *opt)
{
struct hci_dev_req dr = { dev_id: hdev };
uint16_t mtu, mpkt;
-
+
+ if (!opt)
+ return;
+
if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2)
return;
@@ -277,7 +280,10 @@ void cmd_scomtu(int ctl, int hdev, char *opt)
{
struct hci_dev_req dr = { dev_id: hdev };
uint16_t mtu, mpkt;
-
+
+ if (!opt)
+ return;
+
if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2)
return;