fofi/FoFiBase.cc |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5417b8c364fb5f71176f1a22554ac98b20a58815
Author: Vincent Le Garrec <[email protected]>
Date:   Sat Feb 2 05:00:49 2019 +0100

    Integer-overflow in FoFiBase::checkRegion
    
    oss-fuzz/8612

diff --git a/fofi/FoFiBase.cc b/fofi/FoFiBase.cc
index 2bb116a1..03759bce 100644
--- a/fofi/FoFiBase.cc
+++ b/fofi/FoFiBase.cc
@@ -17,6 +17,7 @@
 // Copyright (C) 2011 Jim Meyering <[email protected]>
 // Copyright (C) 2016, 2018 Albert Astals Cid <[email protected]>
 // Copyright (C) 2019 Christian Persch <[email protected]>
+// Copyright (C) 2019 LE GARREC Vincent <[email protected]>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -195,6 +196,7 @@ unsigned int FoFiBase::getUVarBE(int pos, int size, bool 
*ok) const {
 
 bool FoFiBase::checkRegion(int pos, int size) const {
   return pos >= 0 &&
+         size >= 0 &&
          pos < INT_MAX - size &&
          size < INT_MAX - pos &&
          pos + size >= pos &&
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to