mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
LibPDF: Check for end of stream in Reader::matches_regular_character()
The way this was set up before, this function would return "true" if the underlying stream had ended, which would cause us to try to read past the end in some edge cases.
This commit is contained in:
parent
a2b57dd188
commit
1f27c47973
Notes:
sideshowbarker
2024-07-17 00:29:27 +09:00
Author: https://github.com/janso3 Commit: https://github.com/SerenityOS/serenity/commit/1f27c47973 Pull-request: https://github.com/SerenityOS/serenity/pull/17443 Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/rtobar ✅
@ -34,7 +34,7 @@ bool Reader::matches_delimiter() const
|
||||
|
||||
bool Reader::matches_regular_character() const
|
||||
{
|
||||
return !matches_delimiter() && !matches_whitespace();
|
||||
return !done() && !matches_delimiter() && !matches_whitespace();
|
||||
}
|
||||
|
||||
bool Reader::consume_eol()
|
||||
|
Loading…
Reference in New Issue
Block a user