[U-Boot-Users] [PATCH] fixed tftp error message output

Andreas Oberritter obi at saftware.de
Sun Jul 20 00:31:28 CEST 2003


On Sat, 2003-07-19 at 23:59, Wolfgang Denk wrote:
> In message <1058646514.774.55.camel at 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





More information about the U-Boot mailing list