--- ./tftp/tftp.c.orig 2007-07-19 14:56:11.000000000 +0400 +++ ./tftp/tftp.c 2007-07-19 15:31:47.000000000 +0400 @@ -197,9 +197,12 @@ } else { amount += size; + if (size != SEGSIZE) { + break; + } } block++; - } while (size == SEGSIZE); + } while (1); abort: fclose(file); stopclock();