BIND 10 #3010: Fix signed integer overflow

BIND 10 Development do-not-reply at isc.org
Tue Jun 25 07:19:34 UTC 2013


#3010: Fix signed integer overflow
-------------------------------------+-------------------------------------
                   Reporter:  shane  |                 Owner:  UnAssigned
                       Type:         |                Status:  new
  defect                             |             Milestone:  New Tasks
                   Priority:  low    |              Keywords:
                  Component:         |             Sensitive:  0
  libdns++                           |           Sub-Project:  DNS
               CVSS Scoring:         |  Estimated Difficulty:  0
            Defect Severity:  Low    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
 I ran the unit tests with the g++ -ftrapv compile-time option, which is
 documented as:

        -ftrapv
            This option generates traps for signed overflow on addition,
 subtraction, multiplication operations.

 Only one test failed, in rrttl_unittests.cc:

 {{{
     // Second part out of range, and will become negative with the unit,
     EXPECT_THROW(RRTTL("256S307445734561825856M"), InvalidRRTTL);
 }}}

 This is because in parseTTLString() we assume that signed integers
 overflow in a well-defined way, which is not true.

 I've attached a diff which fixes this.

-- 
Ticket URL: <http://bind10.isc.org/ticket/3010>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list