diff --git a/cfg/std.cfg b/cfg/std.cfg
index 96fcc9a47..95a1504c3 100644
--- a/cfg/std.cfg
+++ b/cfg/std.cfg
@@ -5000,10 +5000,14 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
+
+
+
+
diff --git a/test/cfg/std.c b/test/cfg/std.c
index a5e60d3f1..49bc0f43f 100644
--- a/test/cfg/std.c
+++ b/test/cfg/std.c
@@ -3561,6 +3561,17 @@ void bufferAccessOutOfBounds_strxfrm(void)
(void)strxfrm(dest,src,3);
}
+void bufferAccessOutOfBounds_strncmp(void)
+{
+ const char src[3] = "abc";
+ char dest[1] = "a";
+ (void)strncmp(dest,src,1);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ (void)strncmp(dest,src,2);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ (void)strncmp(dest,src,3);
+}
+
void uninitvar_wcsxfrm(void)
{
wchar_t *ds;