[rtems commit] top/task1.c: Fix sprintf() buffer overflow
Joel Sherrill
joel at rtems.org
Thu Jun 22 14:04:32 UTC 2017
Module: rtems
Branch: master
Commit: 5700d8ba52872bf6e22082285561f6bbfd4ff732
Changeset: http://git.rtems.org/rtems/commit/?id=5700d8ba52872bf6e22082285561f6bbfd4ff732
Author: Joel Sherrill <joel at rtems.org>
Date: Sun Jun 11 21:05:42 2017 -0500
top/task1.c: Fix sprintf() buffer overflow
---
testsuites/libtests/top/task1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuites/libtests/top/task1.c b/testsuites/libtests/top/task1.c
index fc81f51..c9e62df 100644
--- a/testsuites/libtests/top/task1.c
+++ b/testsuites/libtests/top/task1.c
@@ -28,7 +28,7 @@ static void create_and_start( uint32_t i )
{
rtems_status_code status;
char str[30];
- char name[5];
+ char name[6];
sprintf(name, "TA%02" PRId32 " ", i);
More information about the vc
mailing list