Commit ed09a268 authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

* src/lsh-writekey.c (main): Check that the given key isn't empty.

Rev: src/lsh-writekey.c:1.33
parent 8ad727f2
......@@ -406,7 +406,7 @@ main(int argc, char **argv)
struct lsh_string *input;
struct lsh_string *output;
const struct exception *e;
argp_parse(&main_argp, argc, argv, 0, NULL, options);
if (! (check_file(options->private_file)
......@@ -421,6 +421,12 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
if (!input->length)
{
werror("Empty key on input, giving up.\n");
return EXIT_FAILURE;
}
output = process_private(input, options);
if (!output)
return EXIT_FAILURE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment