c1f08bdd3a4529ac45faeabb4df3af09abb03cb8
[openwrt.git] / package / busybox / patches / 000-upstream-tftp.patch
1 --- a/networking/tftp.c
2 +++ b/networking/tftp.c
3 @@ -813,7 +813,8 @@ int tftpd_main(int argc UNUSED_PARAM, ch
4                 goto err;
5         }
6         mode = local_file + strlen(local_file) + 1;
7 -       if (mode >= block_buf + result || strcmp(mode, "octet") != 0) {
8 +       /* RFC 1350 says mode string is case independent */
9 +       if (mode >= block_buf + result || strcasecmp(mode, "octet") != 0) {
10                 goto err;
11         }
12  # if ENABLE_FEATURE_TFTP_BLOCKSIZE