diff --git a/cfg/posix.cfg b/cfg/posix.cfg
index 5c077741e..98764ead0 100644
--- a/cfg/posix.cfg
+++ b/cfg/posix.cfg
@@ -23,6 +23,7 @@
+
diff --git a/test/cfg/posix.c b/test/cfg/posix.c
index 968eda836..6134b57ff 100644
--- a/test/cfg/posix.c
+++ b/test/cfg/posix.c
@@ -38,6 +38,15 @@ int nullPointer_ttyname_r(int fd, char *buf, size_t buflen)
return ttyname_r(fd,buf,buflen);
}
+size_t bufferAccessOutOfBounds_wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps)
+{
+ char buf[42];
+ (void)wcsnrtombs(buf,src,nwc,42,ps);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ (void)wcsnrtombs(buf,src,nwc,43,ps);
+ return wcsnrtombs(dest,src,nwc,len,ps);
+}
+
size_t nullPointer_wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps)
{
// It is allowed to set the first arg to NULL