diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-03-13 19:55:41 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-03-13 19:55:41 +0000 |
commit | 2da75e86f1cdb36eea83fc62f8cee58c22dc3a05 (patch) | |
tree | 9b98fefa473be24f077dd60b1971182d5e55b995 /hcid | |
parent | 2b068d28b7a882294d267252251e55a4517382fc (diff) |
Fix segmentation fault with specific passkey agent and missing address
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/passkey-agent.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/passkey-agent.c b/hcid/passkey-agent.c index 7995bafe..b46ba96b 100644 --- a/hcid/passkey-agent.c +++ b/hcid/passkey-agent.c @@ -305,6 +305,11 @@ int main(int argc, char **argv) passkey = strdup(argv[0]); address = (argc > 1) ? strdup(argv[1]) : NULL; + if (!use_default && !address) { + usage(); + exit(1); + } + if (!agent_path) agent_path = strdup(default_path); |