vcl/unx/generic/printer/ppdparser.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit bb913f14b25ae0cf31649b6894fd00745acd37a1 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sat Jan 25 13:23:45 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sat Jan 25 18:29:54 2020 +0100 Argument to PPDContext::getModifiedKey is known to never be negative ...if you check all its current call sites Change-Id: Idbe7c659d25e1ec2f356581a22fbcbe71df1b0a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87389 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index a8554055ab8b..c1f61fae7794 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cassert> #include <stdlib.h> #include <comphelper/string.hxx> @@ -1646,6 +1649,7 @@ PPDContext& PPDContext::operator=( PPDContext&& rCopy ) const PPDKey* PPDContext::getModifiedKey( int n ) const { + assert(n >= 0); if( m_aCurrentValues.size() <= static_cast<hash_type::size_type>(n) ) return nullptr; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits