Ticket #20 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Decoding fragments is invalid

Reported by: dom Owned by: dom
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

decodeLargeLengthDeterminant f t =
   do p <- lift BG.getBit
      if (not p)
         then
            do j <- lift $ BG.getLeftByteString 7
               let l = fromNonNeg 7 j
               f l t
         else
            do q <- lift BG.getBit
               if (not q)
                  then
                     do k <- lift $ BG.getLeftByteString 14
                        let m = fromNonNeg 14 k
                        f m t
                  else
                     do n <- lift $ BG.getLeftByteString 6
                        let fragSize = fromNonNeg 6 n
                        if fragSize <= 0 || fragSize > 4
                           then throwError (fragError ++ show fragSize)
                           else do frag <- f (fragSize * n16k) t
                                   rest <- decodeLargeLengthDeterminant f t
                                   return (B.append frag rest)
                        where
                           fragError = "Unable to decode with fragment size of "

Change History

Changed 6 years ago by dom

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.