diff options
author | Max Krasnyansky <maxk@qualcomm.com> | 2002-03-26 19:25:05 +0000 |
---|---|---|
committer | Max Krasnyansky <maxk@qualcomm.com> | 2002-03-26 19:25:05 +0000 |
commit | b442a036129e5bfe44eb95ef036bdb13f2eba009 (patch) | |
tree | 6063dd95fb577df1053b45199f7af77b68e0f361 /src/hci.c | |
parent | 1247cae735e039a593f42ce9867f8cf8e68effee (diff) |
Check for null string in strtobit.
Diffstat (limited to 'src/hci.c')
-rw-r--r-- | src/hci.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |