In message <[EMAIL PROTECTED]> you wrote:
> 
> #define MAX_LEN 80
> static char tftp_filename[MAX_LEN];
> 
> strncpy(tftp_filename, str, MAX_LEN);
> tftp_filename[MAX_LEN-1] = 0;
> 
> May be truncated, but never overruns.

Acked-by: [EMAIL PROTECTED] :-)


Except that the length should be 128 to  match  the  boot  file  name
length that BOOTP / DHCP can pass as per RFC.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
A committee is a group that keeps the minutes and loses hours.
                                                      -- Milton Berle

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to