X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5c19dc3ae3bd8e40a9c028b0deddd50ff337692c..07691282a056c4efea71e1e505527601e8cc166b:/OSX/libsecurity_cryptkit/lib/giantPort_Generic.h diff --git a/OSX/libsecurity_cryptkit/lib/giantPort_Generic.h b/OSX/libsecurity_cryptkit/lib/giantPort_Generic.h index 7062b406..5f4e4cd3 100644 --- a/OSX/libsecurity_cryptkit/lib/giantPort_Generic.h +++ b/OSX/libsecurity_cryptkit/lib/giantPort_Generic.h @@ -113,10 +113,14 @@ static inline void giantMulDigits( giantDigit *lowProduct, /* RETURNED, low digit */ giantDigit *hiProduct) /* RETURNED, high digit */ { +#if GIANT_LOG2_BITS_PER_DIGIT>5 +#error "dprod is too small to represent the full result of the multiplication" +#else unsigned long long dprod; +#endif dprod = (unsigned long long)dig1 * (unsigned long long)dig2; - *hiProduct = (giantDigit)(dprod >> GIANT_BITS_PER_DIGIT); + *hiProduct = (giantDigit)(dprod >> GIANT_BITS_PER_DIGIT); *lowProduct = (giantDigit)dprod; }