From 027c2f0a31dbfa9a43dd89a8b176eaa650c8f8af Mon Sep 17 00:00:00 2001 From: Luca Errani Date: Mon, 21 Nov 2022 12:30:42 +0100 Subject: [PATCH] fix: segmentation fault on canonicalize method --- source/packaging/manifest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/packaging/manifest.cpp b/source/packaging/manifest.cpp index 6bab2afe..48af8d0a 100644 --- a/source/packaging/manifest.cpp +++ b/source/packaging/manifest.cpp @@ -61,7 +61,11 @@ path manifest::canonicalize(const std::vector &rels) const if (component == "..") { - absolute_parts.pop_back(); + if (absolute_parts.size() > 0) + { + absolute_parts.pop_back(); + } + continue; }