1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

examples: Fix possible null pointer passed to open()

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <norbertpocs0@gmail.com>
This commit is contained in:
Jakub Jelen
2025-04-16 16:19:42 +02:00
parent 344235c954
commit 0068fdd594

View File

@ -350,7 +350,12 @@ int main(int argc, char *argv[])
goto end;
}
if (arguments.action_list && arguments.file) {
if (arguments.file == NULL) {
fprintf(stderr, "Error: Missing argument file\n");
goto end;
}
if (arguments.action_list) {
list_fingerprint(arguments.file);
goto end;
}