From 878f8c349c5df588e512fbc0e76dfa7baf4b26db Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 11 Nov 2002 18:58:24 +0000 Subject: Add check for (!opt) in cmd_aclmtu() and cmd_scomtu() --- tools/hciconfig.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tools/hciconfig.c') 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; -- cgit