diff --git a/tests/error.c b/tests/error.c index 5cbe10385dd4ca3c03c89da32f9e5e412ca93607..4170e1f4bea81dbd24a3a0d630cd926d5ac267fd 100644 --- a/tests/error.c +++ b/tests/error.c @@ -20,7 +20,7 @@ int main(void) { int ret2 = strerror_r(err, buf2, 3); printf("errno: %d = %s, return: %d\n", err, buf2, ret2); - char buf3[256]; + char buf3[256] = {0}; int ret3 = strerror_r(err, buf3, 0); printf("errno: %d = %s, return: %d\n", err, buf3, ret3); }