Quick fix for tftp truncation bug
authorGlenn L McGrath <bug1@ihug.co.nz>
Thu, 26 Feb 2004 07:47:20 +0000 (07:47 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Thu, 26 Feb 2004 07:47:20 +0000 (07:47 -0000)
networking/tftp.c

index f00b64bf29ea19ec1ceb772f84ddad2202b13625..92966a253713268eed47a4762269fde9d0700469 100644 (file)
@@ -528,7 +528,7 @@ int tftp_main(int argc, char **argv)
 #ifdef CONFIG_FEATURE_TFTP_GET
                case 'g':
                        cmd = tftp_cmd_get;
-                       flags = O_WRONLY | O_CREAT;
+                       flags = O_WRONLY | O_CREAT | O_TRUNC;
                        break;
 #endif
 #ifdef CONFIG_FEATURE_TFTP_PUT