From c906d0a5e77cbfd7a52e2f532cad69fe22047713 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 9 Apr 2012 09:43:40 +0200 Subject: cppcheck tells us: "scanf without field width limits can crash with huge input data" (bzr r11191) --- src/sp-filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-filter.cpp') diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp index b39694b3a..a20856f53 100644 --- a/src/sp-filter.cpp +++ b/src/sp-filter.cpp @@ -564,7 +564,7 @@ Glib::ustring sp_filter_get_new_result_name(SPFilter *filter) { int index; if (result) { - if (sscanf(result, "result%d", &index) == 1) + if (sscanf(result, "result%5d", &index) == 1) { if (index > largest) { -- cgit v1.2.3