modify oid.c to use polarssl_snprintf
diff --git a/library/oid.c b/library/oid.c
index 75b0ee0..7bb5631 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -36,6 +36,12 @@
#include <stdio.h>
#include <string.h>
+#if defined(POLARSSL_PLATFORM_C)
+#include "polarssl/platform.h"
+#else
+#define polarssl_snprintf snprintf
+#endif
+
#if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
#include "polarssl/x509.h"
#endif
@@ -653,7 +659,7 @@
/* First byte contains first two dots */
if( oid->len > 0 )
{
- ret = snprintf( p, n, "%d.%d", oid->p[0] / 40, oid->p[0] % 40 );
+ ret = polarssl_snprintf( p, n, "%d.%d", oid->p[0] / 40, oid->p[0] % 40 );
SAFE_SNPRINTF();
}
@@ -670,7 +676,7 @@
if( !( oid->p[i] & 0x80 ) )
{
/* Last byte */
- ret = snprintf( p, n, ".%d", value );
+ ret = polarssl_snprintf( p, n, ".%d", value );
SAFE_SNPRINTF();
value = 0;
}