summaryrefslogtreecommitdiffstats
path: root/net/tftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tftp.c')
-rw-r--r--net/tftp.c2
1 files changed, 2 insertions, 0 deletions
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('#');
OpenPOWER on IntegriCloud