From c3120b038a3f644512f325c7f9aae61781e50be2 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Fri, 15 Mar 2024 10:57:43 +0100 Subject: [PATCH] libvgcode - Fixed potential out of bound access in ViewerImpl::update_view_full_range() --- src/libvgcode/src/ViewerImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvgcode/src/ViewerImpl.cpp b/src/libvgcode/src/ViewerImpl.cpp index 80d7451874..24aa5b3166 100644 --- a/src/libvgcode/src/ViewerImpl.cpp +++ b/src/libvgcode/src/ViewerImpl.cpp @@ -1668,7 +1668,7 @@ void ViewerImpl::update_view_full_range() } // If the first vertex is an extrusion, add an extra step to properly detect the first segment - if (first_it != m_vertices.begin() && first_it->type == EMoveType::Extrude) + if (first_it != m_vertices.begin() && first_it != m_vertices.end() && first_it->type == EMoveType::Extrude) --first_it; if (first_it == m_vertices.end())