From 1a9382ea80b33250325b955ebe76e5860875c5d9 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Sat, 11 Jul 2009 16:35:32 +0000 Subject: [PATCH] - Prevented use of long long in bignum if POLARSSL_HAVE_LONGLONG not defined (found by Giles Bathgate). --- ChangeLog | 3 +++ include/polarssl/bignum.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e3526ecc6..47ff14dfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ Features and X509parse. Bug fixes + * Prevented use of long long in bignum if + POLARSSL_HAVE_LONGLONG not defined (found by Giles + Bathgate). * Fixed incorrect handling of negative strings in mpi_read_string() (found by code coverage tests). * Fixed segfault on handling empty rsa_context in diff --git a/include/polarssl/bignum.h b/include/polarssl/bignum.h index 9c06a3f55..8683a1eb2 100644 --- a/include/polarssl/bignum.h +++ b/include/polarssl/bignum.h @@ -54,7 +54,9 @@ typedef unsigned long t_dbl; defined(__ia64__) || defined(__alpha__) typedef unsigned int t_dbl __attribute__((mode(TI))); #else - typedef unsigned long long t_dbl; + #if defined(POLARSSL_HAVE_LONGLONG) + typedef unsigned long long t_dbl; + #endif #endif #endif #endif