Re: [PATCH 02/10] top/task1.c: Fix sprintf() buffer overflow

2017-06-22 Thread Gedare Bloom
On Thu, Jun 22, 2017 at 10:53 AM, Gedare Bloom  wrote:
> On Wed, Jun 21, 2017 at 1:52 PM, Joel Sherrill  wrote:
>> ---
>>  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);
>
> Do you know that i < 10?
Nevermind, I misread this. Looks good.

>
>>
>> --
>> 1.8.3.1
>>
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 02/10] top/task1.c: Fix sprintf() buffer overflow

2017-06-22 Thread Gedare Bloom
On Wed, Jun 21, 2017 at 1:52 PM, Joel Sherrill  wrote:
> ---
>  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);

Do you know that i < 10?

>
> --
> 1.8.3.1
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 02/10] top/task1.c: Fix sprintf() buffer overflow

2017-06-21 Thread Joel Sherrill
---
 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);
 
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel