Commit 0bb6deda authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

TFTP: don't ack if wrong block num is received

If an unexpected block number was received, break out of the
switch loop.
parent 0a29e244
Loading
Loading
Loading
Loading
+1 −0
Changes for lib/tftp.c: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -604,6 +604,7 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
              NEXT_BLOCKNUM(state->block));
        return CURLE_TFTP_ILLEGAL;
      }
      break;
    }
    /* This is the expected block.  Reset counters and ACK it. */
    state->block = (unsigned short)rblock;