[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] GNU inetutils-1.7 tftp not handle long file name bug

From: 王智通
Subject: [bug-inetutils] GNU inetutils-1.7 tftp not handle long file name bug
Date: Tue, 29 Dec 2009 11:32:05 +0800

Hi, all:


In GNU inetutils-1.7/tftp/main.c:


char line[200];  // cmd line buffer only read 200 bytes, I think it’s too small, if a file name too long(like 256), the tftp client will display:


address@hidden tftp]# ls



tftp>put aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.c

No such file or directory

tftp> ?Invalid command


the command() function only handle 200 bytes buffer:

static void

command ()


  register struct cmd *c;


  for (;;)


      printf ("%s> ", prompt);

      if (fgets (line, sizeof line, stdin) == 0)


           if (feof (stdin))

             exit (0);






I think it’s a little bug, maybe the line variable will has a big bufferJ



This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]