mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +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:
@@ -350,7 +350,12 @@ int main(int argc, char *argv[])
|
|||||||
goto end;
|
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);
|
list_fingerprint(arguments.file);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user