[LTP] [PATCH 08/12] posix/asctime: Fix potentioal buffer overflow
Joerg Vehlow
lkml@jv-coder.de
Fri Nov 19 08:45:58 CET 2021
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
The buffer used in the sprintf was too small and could overflow.
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
.../open_posix_testsuite/conformance/interfaces/asctime/1-1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c
index bc3095081..8463d953d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c
@@ -28,7 +28,7 @@ int main(void)
{
struct tm time_ptr;
- char expected[26];
+ char expected[128];
char *real;
char wday_name[7][3] =
--
2.25.1
More information about the ltp
mailing list