aboutsummaryrefslogtreecommitdiff
path: root/src/libtomcrypt
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtomcrypt')
-rw-r--r--src/libtomcrypt/src/headers/tomcrypt.h4
-rw-r--r--src/libtomcrypt/src/pk/asn1/der_encode_setof.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/libtomcrypt/src/headers/tomcrypt.h b/src/libtomcrypt/src/headers/tomcrypt.h
index 74cdff4..7df3f5a 100644
--- a/src/libtomcrypt/src/headers/tomcrypt.h
+++ b/src/libtomcrypt/src/headers/tomcrypt.h
@@ -25,6 +25,10 @@ extern "C" {
/* descriptor table size */
#define TAB_SIZE 32
+#ifdef _MSC_VER
+#pragma warning(disable: 4333) // der_encode_utf8_string.c(91) : warning C4333: '>>' : right shift by too large amount, data loss
+#endif
+
/* error codes [will be expanded in future releases] */
enum {
CRYPT_OK=0, /* Result OK */
diff --git a/src/libtomcrypt/src/pk/asn1/der_encode_setof.c b/src/libtomcrypt/src/pk/asn1/der_encode_setof.c
index ad7b0f6..b4e97b5 100644
--- a/src/libtomcrypt/src/pk/asn1/der_encode_setof.c
+++ b/src/libtomcrypt/src/pk/asn1/der_encode_setof.c
@@ -102,7 +102,7 @@ int der_encode_setof(ltc_asn1_list *list, unsigned long inlen,
}
/* get the size of the static header */
- hdrlen = ((unsigned long)ptr) - ((unsigned long)buf);
+ hdrlen = (unsigned long)((size_t)ptr - (size_t)buf);
/* scan for edges */