Fix passwd seg fault
authorMatt Caswell <matt@openssl.org>
Tue, 26 Apr 2016 16:00:33 +0000 (17:00 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Apr 2016 08:17:37 +0000 (09:17 +0100)
Passing the -stdin arg to the passwd command line app *and* supply a
password on the command line causes a seg fault.

Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/passwd.c

index 98092bb04b5d0080ea3ed89d1e7c224801ceff66..2f114db05c276eef18e731f14d39244aa6856744 100644 (file)
@@ -175,6 +175,7 @@ int passwd_main(int argc, char **argv)
             if (pw_source_defined)
                 goto opthelp;
             in_stdin = 1;
+            pw_source_defined = 1;
             break;
         }
     }