GH634: fix potential memory leak
[openssl.git] / apps / pkeyparam.c
index fbd19a78cd7a9ced9f0266cbc36a5f8e70437a58..abb40d1ab29c98133d5cfe13d155ce7bb0974058 100644 (file)
@@ -118,10 +118,10 @@ int pkeyparam_main(int argc, char **argv)
     argc = opt_num_rest();
     argv = opt_rest();
 
-    in = bio_open_default(infile, "r");
+    in = bio_open_default(infile, 'r', FORMAT_PEM);
     if (in == NULL)
         goto end;
-    out = bio_open_default(outfile, "w");
+    out = bio_open_default(outfile, 'w', FORMAT_PEM);
     if (out == NULL)
         goto end;
     pkey = PEM_read_bio_Parameters(in, NULL);