Page MenuHomeFreeBSD

D57074.diff
No OneTemporary

D57074.diff

diff --git a/usr.bin/tftp/tests/tftp_test.sh b/usr.bin/tftp/tests/tftp_test.sh
--- a/usr.bin/tftp/tests/tftp_test.sh
+++ b/usr.bin/tftp/tests/tftp_test.sh
@@ -442,6 +442,29 @@
stop_tftpd
}
+atf_test_case tftp_url_long cleanup
+tftp_url_long_head() {
+ atf_set "descr" "Very long URL"
+ atf_set "require.user" "root"
+}
+tftp_url_long_body() {
+ start_tftpd
+ mkdir "${tftp_dir}/subdirectory"
+ local remote_file="${tftp_dir}/hello.txt"
+ echo "Hello, $$!" >"${remote_file}"
+ local local_file="${remote_file##*/}"
+ local d="subdirectory/../"
+ d="${d}${d}${d}${d}${d}${d}${d}${d}"
+ d="${d}${d}${d}${d}${d}${d}${d}${d}"
+ d="${d}${d}${d}${d}${d}${d}${d}${d}"
+ atf_check -s exit:1 -o match:"Illegal TFTP operation" \
+ tftp "tftp://localhost/${d}${remote_file##*/}"
+ atf_check -s exit:1 test -f "${local_file}"
+}
+tftp_url_long_cleanup() {
+ stop_tftpd
+}
+
atf_init_test_cases() {
atf_add_test_case tftp_get_big
atf_add_test_case tftp_get_host
@@ -462,4 +485,5 @@
atf_add_test_case tftp_url_host
atf_add_test_case tftp_url_ipv4
atf_add_test_case tftp_url_ipv6
+ atf_add_test_case tftp_url_long
}

File Metadata

Mime Type
text/plain
Expires
Mon, Jul 6, 7:56 AM (13 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33328968
Default Alt Text
D57074.diff (1 KB)

Event Timeline