From 5a099569f0f01e6103b8a3a23948e06e30f4a1a4 Mon Sep 17 00:00:00 2001 From: MAVProxyUser Date: Tue, 8 Sep 2026 13:15:28 -0400 Subject: [PATCH] Fix stack buffer overflow in ADMesh stl_read (bound solid-name fscanf) Co-Authored-By: Claude Opus 4.8 --- src/admesh/stlinit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp index a6c0c5cf..6be9072c 100644 --- a/src/admesh/stlinit.cpp +++ b/src/admesh/stlinit.cpp @@ -166,7 +166,7 @@ static bool stl_read(stl_file *stl, FILE *fp, int first_facet, bool first, Impor rewind(fp); try{ char solid_content[256]; - int res_solid = fscanf(fp, " solid %[^\n]", solid_content); + int res_solid = fscanf(fp, " solid %255[^\n]", solid_content); if (res_solid == 1) { /*include ml info*/ std::string ext_content(solid_content);