Initialise return values to an error
Initialising the return values to and error is best practice and makes
the library more robust.
diff --git a/library/oid.c b/library/oid.c
index 27c455e..891d3cd 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -31,6 +31,7 @@
#include "mbedtls/oid.h"
#include "mbedtls/rsa.h"
+#include "mbedtls/error.h"
#include <stdio.h>
#include <string.h>
@@ -732,7 +733,7 @@
int mbedtls_oid_get_numeric_string( char *buf, size_t size,
const mbedtls_asn1_buf *oid )
{
- int ret;
+ int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t i, n;
unsigned int value;
char *p;