Fix DER output of gen_key app (found by Gergely Budai)
diff --git a/ChangeLog b/ChangeLog
index 110398e..4b266d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
* Other minor issues (found by Peter Vaskovic)
* Fix symlink command for cross compiling with CMake (found by Andre
Heinecke)
+ * Fix DER output of gen_key app (found by Gergely Budai)
= PolarSSL 1.3.7 released on 2014-05-02
Features
diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c
index 7c8efef..2f3ba35 100644
--- a/programs/pkey/gen_key.c
+++ b/programs/pkey/gen_key.c
@@ -143,7 +143,7 @@
return( ret );
len = ret;
- c = output_buf + sizeof(output_buf) - len - 1;
+ c = output_buf + sizeof(output_buf) - len;
}
if( ( f = fopen( output_file, "w" ) ) == NULL )