summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-08-27 16:46:06 +0200
committerJay Berkenbilt <ejb@ql.org>2019-08-27 17:26:25 +0200
commitad8081daf597b8f46696d5ddae82770ab419ad82 (patch)
tree95190bbb993b2f43f55a7ef85ae8708697d86c2d /include
parent9a095c5c76cdc14379a65f0e50dcccea30d425aa (diff)
downloadqpdf-ad8081daf597b8f46696d5ddae82770ab419ad82.tar.zst
Fix fuzz issue 15442 (overflow checking in BufferInputSource)
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/BufferInputSource.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/qpdf/BufferInputSource.hh b/include/qpdf/BufferInputSource.hh
index 90263335..b11189eb 100644
--- a/include/qpdf/BufferInputSource.hh
+++ b/include/qpdf/BufferInputSource.hh
@@ -54,7 +54,7 @@ class BufferInputSource: public InputSource
virtual void unreadCh(char ch);
private:
- qpdf_offset_t const bufSizeAsOffset() const;
+ static void range_check(qpdf_offset_t cur, qpdf_offset_t delta);
class Members
{
@@ -72,6 +72,7 @@ class BufferInputSource: public InputSource
std::string description;
Buffer* buf;
qpdf_offset_t cur_offset;
+ qpdf_offset_t max_offset;
};
PointerHolder<Members> m;