summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/tftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tftp.c b/net/tftp.c
index 0a2c53302c..fd58660d3b 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -239,6 +239,8 @@ static void show_block_marker(void)
#ifdef CONFIG_TFTP_TSIZE
if (TftpTsize) {
ulong pos = TftpBlock * TftpBlkSize + TftpBlockWrapOffset;
+ if(pos > TftpTsize)
+ pos = TftpTsize;
while (TftpNumchars < pos * 50 / TftpTsize) {
putc('#');