[Libreoffice-commits] core.git: vcl/unx

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 25 16:03:49 UTC 2020


 vcl/unx/generic/printer/ppdparser.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 60eca4ec0d35da6f943a5894068e1b8d8d666046
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Jan 25 13:16:06 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Jan 25 17:03:13 2020 +0100

    Fix off-by-one error in PPDContext::getModifiedKey
    
    ...introduced with 19be86249dcc5b13b3c95f5469600fa2bc1b749b "Simplify containers
    iterations in vcl"
    
    Change-Id: I95bd303b744796a2b585575c4cdf548e4a0a729f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87379
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Arkadiy Illarionov <qarkai at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 96f2bdc0e253..a8554055ab8b 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1646,7 +1646,7 @@ PPDContext& PPDContext::operator=( PPDContext&& rCopy )
 
 const PPDKey* PPDContext::getModifiedKey( int n ) const
 {
-    if( m_aCurrentValues.size() < static_cast<hash_type::size_type>(n) )
+    if( m_aCurrentValues.size() <= static_cast<hash_type::size_type>(n) )
         return nullptr;
 
     hash_type::const_iterator it = m_aCurrentValues.begin();


More information about the Libreoffice-commits mailing list