From 732903ecf1bdb085cac36eb29d330a7970670064 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sun, 18 Feb 2018 09:42:04 +0100 Subject: [PATCH] Fix buffer size warning due to missing space for null terminator in pdfseparate. --- utils/pdfseparate.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc index bfcd0748..4751158a 100644 --- a/utils/pdfseparate.cc +++ b/utils/pdfseparate.cc @@ -11,6 +11,7 @@ // Copyright (C) 2013 Suzuki Toshiya // Copyright (C) 2017 Léonard Michelet // Copyright (C) 2017 Adrian Johnson +// Copyright (C) 2018 Adam Reichold // //======================================================================== #include "config.h" @@ -88,7 +89,7 @@ static bool extractPages (const char *srcFileName, const char *destFileName) { foundmatch = true; *p = 'A'; } else { - char pattern[5]; + char pattern[6]; for (int i = 2; i < 10; i++) { sprintf(pattern, "%%0%dd", i); p = strstr(auxDestFileName, pattern); -- 2.22.0