From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 16 Jan 2008 23:27:54 +0100 Subject: [U-Boot-Users] [PATCH] TFTP: add host ip addr support In-Reply-To: <20080116212624.AE252243C0@gemini.denx.de> References: <1200517000.31842.70.camel@localhost> <20080116212624.AE252243C0@gemini.denx.de> Message-ID: <20080116222754.GG31365@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 22:26 Wed 16 Jan , Wolfgang Denk wrote: > In message <1200517000.31842.70.camel@localhost> 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: wd at denx.de :-) > > > Except that the length should be 128 to match the boot file name > length that BOOTP / DHCP can pass as per RFC. Personnaly, I'll prefer 1K length because if you use as I use a lost of time a full path when downloading uImage or other so a path with a length over than 512 arrive often. And with nfs it's the same Best Regards, J.