From b442a036129e5bfe44eb95ef036bdb13f2eba009 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 26 Mar 2002 19:25:05 +0000 Subject: Check for null string in strtobit. --- src/hci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hci.c b/src/hci.c index fb7a2780..544607b9 100644 --- a/src/hci.c +++ b/src/hci.c @@ -74,8 +74,7 @@ static int hci_str2bit(hci_map *map, char *str, unsigned int *val) hci_map *m; int set; - str = ptr = strdup(str); - if (!str) + if (!str || !(str = ptr = strdup(str))) return 0; *val = set = 0; -- cgit