... and just move them into the accepted range. Like how buffersize and
a few other options work.
Closes #14634
* TFTP option that specifies the block size to use for data transmission.
*/
arg = va_arg(param, long);
- if(arg > TFTP_BLKSIZE_MAX || arg < TFTP_BLKSIZE_MIN)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ if(arg < TFTP_BLKSIZE_MIN)
+ arg = 512;
+ else if(arg > TFTP_BLKSIZE_MAX)
+ arg = TFTP_BLKSIZE_MAX;
data->set.tftp_blksize = arg;
break;
#endif