- Fixed correct printing of serial number '00'

This commit is contained in:
Paul Bakker 2011-12-05 14:38:06 +00:00
parent b8ba90b316
commit 9304880e8a

View File

@ -2426,7 +2426,7 @@ int x509parse_serial_gets( char *buf, size_t size, const x509_buf *serial )
for( i = 0; i < nr; i++ )
{
if( i == 0 && serial->p[i] == 0x0 )
if( i == 0 && nr > 1 && serial->p[i] == 0x0 )
continue;
ret = snprintf( p, n, "%02X%s",