diff --git a/cfg/posix.cfg b/cfg/posix.cfg
index 55b8ff243..37801fe58 100644
--- a/cfg/posix.cfg
+++ b/cfg/posix.cfg
@@ -3983,6 +3983,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
+
diff --git a/test/cfg/posix.c b/test/cfg/posix.c
index 3aa38c14c..ed5e7bb11 100644
--- a/test/cfg/posix.c
+++ b/test/cfg/posix.c
@@ -249,6 +249,29 @@ int nullPointer_bcmp(const void *a, const void *b, size_t n)
return bcmp(NULL, b, n);
}
+void nullPointer_bzero(void *s, size_t n)
+{
+ // cppcheck-suppress nullPointer
+ // cppcheck-suppress bzeroCalled
+ bzero(NULL,n);
+ // No nullPointer-warning shall be shown:
+ // cppcheck-suppress bzeroCalled
+ bzero(s,n);
+}
+
+void bufferAccessOutOfBounds_bzero(void *s, size_t n)
+{
+ char buf[42];
+ // cppcheck-suppress bufferAccessOutOfBounds
+ // cppcheck-suppress bzeroCalled
+ bzero(buf,43);
+ // cppcheck-suppress bzeroCalled
+ bzero(buf,42);
+ // No nullPointer-warning shall be shown:
+ // cppcheck-suppress bzeroCalled
+ bzero(s,n);
+}
+
char * nullPointer_stpcpy(char *src, char *dest)
{
// No warning shall be shown: