jadams-tresys commented on a change in pull request #433:
URL: https://github.com/apache/incubator-daffodil/pull/433#discussion_r504737300



##########
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:
       I pushed up changes that I think cover all the getByteArray issues. As 
for the binaryNumberParsers, I think it might be worth making its own ticket 
that can be dealt with later as it is a much less likely situation to occur.




----------------------------------------------------------------
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]


Reply via email to