X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=net%2Ftftp.c;h=89be32a26bd8cfaca738bda523cc400830088fa4;hp=3e99e7309116c333576a366735214ccb66c6fdc3;hb=1f8434723ebbae4a1d95181e2b05a5e6dadfb02c;hpb=baeb63bf7f95a0dd888875f3b370780b050a2f1c diff --git a/net/tftp.c b/net/tftp.c index 3e99e73091..89be32a26b 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -249,6 +249,8 @@ static void show_block_marker(void) if (tftp_tsize) { ulong pos = tftp_cur_block * tftp_block_size + tftp_block_wrap_offset; + if (pos > tftp_tsize) + pos = tftp_tsize; while (tftp_tsize_num_hash < pos * 50 / tftp_tsize) { putc('#');