From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Oberritter Date: 20 Jul 2003 00:31:28 +0200 Subject: [U-Boot-Users] [PATCH] fixed tftp error message output In-Reply-To: <20030719220001.B03E6C6D82@atlas.denx.de> References: <20030719220001.B03E6C6D82@atlas.denx.de> Message-ID: <1058653888.774.80.camel@localhost> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 2003-07-19 at 23:59, Wolfgang Denk wrote: > In message <1058646514.774.55.camel@localhost> you wrote: > > > > Just try to tftp a file which does not exist on the server or which does > > not have correct permissions (leading to a "file not found" message). I > > am using atftpd on debian sarge and sid. > > Done - I get this then: > > => tftp 100000 foo > TFTP from server 10.0.0.14; our IP address is 10.0.0.99 > Filename 'foo'. > Load address: 0x100000 > Loading: * > TFTP error: 'File not found' (1) > Starting again > > > Nothing wrong, or am I missing something? My guess is that your tftp server correctly appends \0 to the error message and atftpd does not. Strange. Having a look at atftpd source code I suspect that its use of strncpy for the error message is the cause, but I think u-boot should not rely on the trailing \0, because the length of the error message is known anyway. I'll report when I have been able to test it. Regards, Andreas