From 45476d093cdea0aad0668bf5ecac0ec4bd34d970 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 19 Feb 2025 17:14:25 +0100 Subject: test/editor: ensure buffer termination ... in source file and documentation --- documentation/src/editor.dox | 1 + 1 file changed, 1 insertion(+) (limited to 'documentation/src/editor.dox') diff --git a/documentation/src/editor.dox b/documentation/src/editor.dox index fb93e63b7..8d9d2fb1e 100644 --- a/documentation/src/editor.dox +++ b/documentation/src/editor.dox @@ -131,6 +131,7 @@ void update_title() { fname = fl_filename_name(app_filename); if (fname) { char buf[FL_PATH_MAX + 3]; + buf[FL_PATH_MAX + 2] = '\0'; // ensure that the buffer is always terminated if (text_changed) { snprintf(buf, FL_PATH_MAX+2, "%s *", fname); } else { -- cgit v1.2.3