]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cryptkit/lib/giantPort_Generic.h
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / giantPort_Generic.h
index 7062b406f23d2915b5f39ee1c403dd5b50ffbb58..5f4e4cd351fc8abe4fc27a4a18321017957df896 100644 (file)
@@ -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;
 }