stevedlawrence commented on a change in pull request #433:
URL: https://github.com/apache/incubator-daffodil/pull/433#discussion_r504844261
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/SpecifiedLengthParsers.scala
##########
@@ -90,7 +90,9 @@ sealed abstract class SpecifiedLengthParserBase(
Assert.invariant(dis eq pState.dataInputStream)
val bitsToSkip = finalEndPos0b - dis.bitPos0b
Assert.invariant(bitsToSkip >= 0) // if this is < 0, then the parsing of
children went past the limit, which it isn't supposed to.
- if (bitsToSkip > 0) {
+ if (bitsToSkip > Int.MaxValue) {
+ PE(pState, "Data too large, consider using blobs instead:
https://cwiki.apache.org/confluence/display/DAFFODIL/Proposal%3A+Binary+Large+Objects")
+ } else if (bitsToSkip > 0) {
Review comment:
Yeah, agreed this is too much to fix for now. I think we really do need
to come up with a comprehensive way to ensure we dont' have any overflow
issues, but it's fine to create a new bug and handle that more completely later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]