Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-51

Classes wrapping integer values should check range

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 134

    Description

      typedef nanotime

      { description "Absolute number of nanoseconds since the start of the UNIX epoch."; type uint64; units nanoseconds; }

      results in Nanotime class wrapping a BigInteger. The constructor of the class does not check for range, allowing a Nanotime to be constructed which does not fit an uint64.

      This applies to any range upgrades (such as uint8 being served by short), as well as when the range is restricted explicitly by a range YANG statement.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: