> From: Martin Pirker [mailto:martin.pir...@iaik.tugraz.at]
> Sent: Monday, April 26, 2010 5:36 AM
>
> Hi...
>
> Compiling latest revision fails with:
>
> In function 'strncat',
>     inlined from 'add_plugins' at crtpolelt.c:118,
>     inlined from 'main' at crtpolelt.c:132:
> /usr/include/bits/string3.h:153: error: call to __builtin___strncat_chk might 
> overflow
> destination buffer
> make[2]: *** [crtpolelt.o] Error 1
> make[2]: Leaving directory `.../hg_tboot/lcptools'
>
>
> crtpolelt.c line 118 is
>   strncat(help, plugin->help_txt, MAX_HELP_TEXT)
>
> and
>   #define MAX_HELP_TEXT       4096
>   static char help[MAX_HELP_TEXT] = .....
>
> so indeed one byte always added by strncat for \0 may be missing
> (see man page).
>
> Martin

Good catch.  What compiler, and version of it, are you using.  gcc 4.4.3 
doesn't catch this.

Joe

>
> ------------------------------------------------------------------------------
> _______________________________________________
> tboot-devel mailing list
> tboot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tboot-devel

------------------------------------------------------------------------------
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to