]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tftp: return error if it hits an illegal state
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2025 16:25:55 +0000 (18:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2025 21:52:57 +0000 (23:52 +0200)
Reported-by: Joshua Rogers
Closes #18894

lib/tftp.c

index 56b7afda520159f23945788996cf5251b662c4cd..8279f29e650e83ce4846358d3f02292f091ffe15 100644 (file)
@@ -564,7 +564,7 @@ static CURLcode tftp_send_first(struct tftp_conn *state,
 
   default:
     failf(state->data, "tftp_send_first: internal error");
-    break;
+    return CURLE_TFTP_ILLEGAL;
   }
 
   return result;