Parcourir la source

avoid using a large (>= 2^32) constant for wider portability.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac372@3632 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya il y a 14 ans
Parent
commit
1d6285dc43
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/lib/dns/rdata/any_255/tsig_250.cc

+ 2 - 1
src/lib/dns/rdata/any_255/tsig_250.cc

@@ -249,7 +249,8 @@ TSIG::TSIG(const Name& algorithm, uint64_t time_signed, uint16_t fudge,
            uint16_t error, uint16_t other_len, const void* other_data) :
     impl_(NULL)
 {
-    if (time_signed > 0xffffffffffff) {
+    // Time Signed is a 48-bit value.
+    if ((time_signed >> 48) != 0) {
         isc_throw(OutOfRange, "TSIG Time Signed is too large: " <<
                   time_signed);
     }