diff --git a/cfg/std.cfg b/cfg/std.cfg
index bb881cb43..a755f81f8 100644
--- a/cfg/std.cfg
+++ b/cfg/std.cfg
@@ -5331,7 +5331,9 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
false
-
+
+
+
diff --git a/test/cfg/std.c b/test/cfg/std.c
index 81115f2f5..bd6a93448 100644
--- a/test/cfg/std.c
+++ b/test/cfg/std.c
@@ -25,6 +25,15 @@
#include
#include
+size_t bufferAccessOutOfBounds_wcsrtombs(char * dest, const wchar_t ** src, size_t len, mbstate_t * ps)
+{
+ char buf[42];
+ (void)wcsrtombs(buf,src,42,ps);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ (void)wcsrtombs(buf,src,43,ps);
+ return wcsrtombs(dest,src,len,ps);
+}
+
void bufferAccessOutOfBounds(void)
{
char a[5];
diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp
index b7273cf61..fa717befe 100644
--- a/test/cfg/std.cpp
+++ b/test/cfg/std.cpp
@@ -31,6 +31,15 @@
#include
#include
+size_t bufferAccessOutOfBounds_wcsrtombs(char * dest, const wchar_t ** src, size_t len, mbstate_t * ps)
+{
+ char buf[42];
+ (void)std::wcsrtombs(buf,src,42,ps);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ (void)std::wcsrtombs(buf,src,43,ps);
+ return std::wcsrtombs(dest,src,len,ps);
+}
+
void invalidFunctionArg_std_string_substr(const std::string &str, std::size_t pos, std::size_t len) {
// cppcheck-suppress invalidFunctionArg
(void)str.substr(-1,len);