aboutsummaryrefslogtreecommitdiff
path: root/sample.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-03-04 04:25:48 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-03-04 04:25:48 +0000
commit77743b75f41bd353c09da6a740562d621ed9382d (patch)
tree8ad12c408d352bd171b3f160aee109a660812c3d /sample.c
parent077dd81fcc9453613de18c6d037ef61f3a8e161c (diff)
downloadlibssh-77743b75f41bd353c09da6a740562d621ed9382d.tar.gz
libssh-77743b75f41bd353c09da6a740562d621ed9382d.tar.xz
libssh-77743b75f41bd353c09da6a740562d621ed9382d.zip
fixed null pointer into options and ssh_set_error()
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@138 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'sample.c')
-rw-r--r--sample.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sample.c b/sample.c
index 9fef51ed..7baff76a 100644
--- a/sample.c
+++ b/sample.c
@@ -379,8 +379,10 @@ int main(int argc, char **argv){
unsigned char hash[MD5_DIGEST_LEN];
options=ssh_options_new();
- if(ssh_options_getopt(options,&argc, argv))
- usage();
+ if(ssh_options_getopt(options,&argc, argv)){
+ fprintf(stderr,"error parsing command line :%s\n",ssh_get_error(options));
+ usage();
+ }
opts(argc,argv);
signal(SIGTERM,do_exit);
if(user)