-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless loop in constructor with empty ByteArrayInputStream #56
Comments
Hi, I was kinda reluctant to open the issue here, as it has an impact on the Apache Tika project and I was trying to figure out who to contact and how. You can do a Denial of Service with a correctly crafted input, so this issue is quite important. See the gists: https://gist.github.com/syjer/9ffebab4538fbc4242d10e50fa5a4454 |
mikrovvelle
pushed a commit
to mikrovvelle/nifi-marklogic-sas
that referenced
this issue
Jan 3, 2020
xantorohara
added a commit
to xantorohara/parso
that referenced
this issue
Dec 29, 2020
epam#56 Fixed infinity loop on empty or incomplete input stream
xantorohara
added a commit
to xantorohara/parso
that referenced
this issue
Dec 29, 2020
epam#56 Fixed infinity loop on empty or incomplete input stream
printsev
pushed a commit
that referenced
this issue
Dec 29, 2020
closed thanks to xantorohara |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code, using the
SasFileReaderImpl
class, will lead to an endless loop:Probably no one should be passing in empty ByteArrayInputStreams to the constructor, but instead of getting caught in an endless loop, it would be helpful to throw an exception instead. This would allow classes extending
SasFileReaderImpl
to easily catch this kind of bad input.The loop takes place in
getBytesFromFile
inSasFileParser
, line 750:actuallySkipped
andcurrentFilePosition
are stuck at 0, whileoffset[0]
is 32, so thewhile
statement never exits.The text was updated successfully, but these errors were encountered: