You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/10/15 16:16:34 UTC
[GitHub] rnewson opened a new pull request #1654: Test correct condition for
exceed_limit error
rnewson opened a new pull request #1654: Test correct condition for exceed_limit error
URL: https://github.com/apache/couchdb/pull/1654
Previously we were testing if Pos + TotalBytes exceeded the pread
limit. This is the wrong logic entirely. We are trying to prevent an
attempted call to file:pread/3 where the third parameter, the number
of bytes to read, is a very large number (due to a corruption
elsewhere, say). Instead we throw exceed_limit as soon as a file gets
above a certain size.
I switched this to an if statement to make it clear that the "read
past EOF" and "try to read too many bytes" checks are quite distinct
from each other.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services