mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	modify oid.c to use polarssl_snprintf
This commit is contained in:
		
							parent
							
								
									46b0a8d15a
								
							
						
					
					
						commit
						8f3a9436a9
					
				@ -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 @@ int oid_get_numeric_string( char *buf, size_t size,
 | 
			
		||||
    /* 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 @@ int oid_get_numeric_string( char *buf, size_t size,
 | 
			
		||||
        if( !( oid->p[i] & 0x80 ) )
 | 
			
		||||
        {
 | 
			
		||||
            /* Last byte */
 | 
			
		||||
            ret = snprintf( p, n, ".%d", value );
 | 
			
		||||
            ret = polarssl_snprintf( p, n, ".%d", value );
 | 
			
		||||
            SAFE_SNPRINTF();
 | 
			
		||||
            value = 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user