From db7a2f93e02754a2abedee7316d765157a3b8738 Mon Sep 17 00:00:00 2001 From: Bruno Levy Date: Tue, 22 Aug 2023 13:15:54 +0200 Subject: [PATCH] fix for out of bound string access in boolean expr parser (thanks @grassofsky) --- src/lib/geogram/mesh/mesh_surface_intersection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/geogram/mesh/mesh_surface_intersection.cpp b/src/lib/geogram/mesh/mesh_surface_intersection.cpp index 4e73ade556d2..b7fa74f52a63 100644 --- a/src/lib/geogram/mesh/mesh_surface_intersection.cpp +++ b/src/lib/geogram/mesh/mesh_surface_intersection.cpp @@ -1139,7 +1139,7 @@ namespace { } char cur_char() const { - return *ptr_; + return (ptr_ == expr_.end()) ? '\0' : *ptr_; } void next_char() {