diff options
author | Adriaan de Jong <dejong@fox-it.com> | 2012-02-28 17:29:47 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-03-29 14:47:13 +0200 |
commit | 2e2939e8b2680b287e4cce3af84357684e5e5093 (patch) | |
tree | a833d4e5fbf454c190d890f65d858a4906d90400 /src/openvpn/ssl_verify_polarssl.c | |
parent | 39b54baa36e8625fd29d0a1ed6482f83fa78d322 (diff) | |
download | openvpn-2e2939e8b2680b287e4cce3af84357684e5e5093.tar.gz openvpn-2e2939e8b2680b287e4cce3af84357684e5e5093.tar.xz openvpn-2e2939e8b2680b287e4cce3af84357684e5e5093.zip |
Fixed off-by-one in serial length calculation
The serial length was one digit too short, resulting in missing digits
at the end of the certificate's stringified serial number.
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn/ssl_verify_polarssl.c')
-rw-r--r-- | src/openvpn/ssl_verify_polarssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/ssl_verify_polarssl.c b/src/openvpn/ssl_verify_polarssl.c index 53e6006..85c44dd 100644 --- a/src/openvpn/ssl_verify_polarssl.c +++ b/src/openvpn/ssl_verify_polarssl.c @@ -127,7 +127,7 @@ x509_get_serial (x509_cert *cert) int ret = 0; int i = 0; char *buf = NULL; - size_t len = cert->serial.len * 3; + size_t len = cert->serial.len * 3 + 1; buf = malloc(len); ASSERT(buf); |