summaryrefslogtreecommitdiffstats
path: root/thirdparty/mbedtls/library/asn1write.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-07-28 15:40:40 +0200
committerGitHub <noreply@github.com>2018-07-28 15:40:40 +0200
commit04ec0bf5e1714131d31421f59083578236274ff7 (patch)
treea2169e7883b981521a9900b76f7cbd9af1df1fac /thirdparty/mbedtls/library/asn1write.c
parentbdbc63c4eeeb43176d48b40fb713e793c40a1f3d (diff)
parentd8e1cd7a109bc832826f21d6df1faf401be8dcc9 (diff)
downloadredot-engine-04ec0bf5e1714131d31421f59083578236274ff7.tar.gz
Merge pull request #20539 from akien-mga/mbedtls-2.12.0
mbedtls: Update to upstream version 2.12.0
Diffstat (limited to 'thirdparty/mbedtls/library/asn1write.c')
-rw-r--r--thirdparty/mbedtls/library/asn1write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/thirdparty/mbedtls/library/asn1write.c b/thirdparty/mbedtls/library/asn1write.c
index c01c836550..72acdf3012 100644
--- a/thirdparty/mbedtls/library/asn1write.c
+++ b/thirdparty/mbedtls/library/asn1write.c
@@ -83,7 +83,9 @@ int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len
return( 4 );
}
+#if SIZE_MAX > 0xFFFFFFFF
if( len <= 0xFFFFFFFF )
+#endif
{
if( *p - start < 5 )
return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
@@ -96,7 +98,9 @@ int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len
return( 5 );
}
+#if SIZE_MAX > 0xFFFFFFFF
return( MBEDTLS_ERR_ASN1_INVALID_LENGTH );
+#endif
}
int mbedtls_asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag )