]> granicus.if.org Git - curl/commitdiff
tftp: use the current blksize for recvfrom()
authorDaniel Stenberg <daniel@haxx.se>
Fri, 3 May 2019 20:20:37 +0000 (22:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 20 May 2019 05:57:49 +0000 (07:57 +0200)
bug: https://curl.haxx.se/docs/CVE-2019-5436.html
Reported-by: l00p3r on hackerone
CVE-2019-5436

lib/tftp.c

index 8b92b7bd68cc8cac1332452f204a287f07bbb23c..289cda2825f05356c5e26dc76f1d7ffd2b760f7b 100644 (file)
@@ -1009,7 +1009,7 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done)
   state->sockfd = state->conn->sock[FIRSTSOCKET];
   state->state = TFTP_STATE_START;
   state->error = TFTP_ERR_NONE;
-  state->blksize = TFTP_BLKSIZE_DEFAULT;
+  state->blksize = blksize;
   state->requested_blksize = blksize;
 
   ((struct sockaddr *)&state->local_addr)->sa_family =