[rtems commit] Use counted strnlen in bin2c. Closes #2238.

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Feb 23 15:51:08 UTC 2015


On 23/02/15 16:38, Gedare Bloom wrote:
> Module:    rtems
> Branch:    master
> Commit:    1281c34a235fd031352dd43f437d84cf2c8421a7
> Changeset: http://git.rtems.org/rtems/commit/?id=1281c34a235fd031352dd43f437d84cf2c8421a7
>
> Author:    Gedare Bloom <gedare at rtems.org>
> Date:      Mon Feb 23 10:38:37 2015 -0500
>
> Use counted strnlen in bin2c. Closes #2238.
>
> ---
>
>   tools/build/rtems-bin2c.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/build/rtems-bin2c.c b/tools/build/rtems-bin2c.c
> index 391c259..7674389 100644
> --- a/tools/build/rtems-bin2c.c
> +++ b/tools/build/rtems-bin2c.c
> @@ -72,7 +72,7 @@ void process(const char *ifname, const char *ofname)
>     }
>
>     strncpy( obasename, ofname, PATH_MAX );
> -  len = strlen( obasename );
> +  len = strnlen( obasename, PATH_MAX );

Its hard to believe, but changes like this break the Windows build. I 
adjusted the Makefile.am with a potential fix.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list