Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1704

PE undetected - Binary number parsers are missing checks for bitLength

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0
    • Fix Version/s: deferred
    • Component/s: Back End, General
    • Labels:
      None

      Description

      This was discussed in a review of boolean parser and unparser, which have a check for bitLength that the binary number parsers do not. These checks would verify that bitLength falls within the accepted range for it's type as noted in 12.3.7.2.1 in the spec. It also needs to be determined if this check would be better in an evaluatable so it could be done at compile time.

      The check in BinaryBooleanParsers.scala:

          val nBits = getBitLength(start)
          if (nBits < 1 || nBits > 32) {
            PE(start, "Number of bits %d out of range, must be between 1 and 32 bits.", nBits)
            return
          }

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              efinnegan Elizabeth Finnegan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Tasks