about summary refs log tree commit diff
path: root/resolv/tst-ns_name_pton.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-11-11 11:41:45 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-11-11 11:41:45 +0100
commit9e0ad3049dbae88d615bfb038e53bf365a39a634 (patch)
treed32e5a7fdec7a85c68fe33208868a46bdab441dd /resolv/tst-ns_name_pton.c
parente2a9fca8101443076235a8dbcfceaa2d96bf4801 (diff)
downloadglibc-9e0ad3049dbae88d615bfb038e53bf365a39a634.tar.gz
glibc-9e0ad3049dbae88d615bfb038e53bf365a39a634.tar.xz
glibc-9e0ad3049dbae88d615bfb038e53bf365a39a634.zip
resolv: ns_name_pton should report trailing \ as error [BZ #22413]
Diffstat (limited to 'resolv/tst-ns_name_pton.c')
-rw-r--r--resolv/tst-ns_name_pton.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/resolv/tst-ns_name_pton.c b/resolv/tst-ns_name_pton.c
index 879d97c9d3..73bdb05e08 100644
--- a/resolv/tst-ns_name_pton.c
+++ b/resolv/tst-ns_name_pton.c
@@ -127,6 +127,13 @@ static const struct test_case tests[] =
       "\377\377", NULL, },
     { STRING63OCT "." STRING63OCT "." STRING63OCT "." STRING60OCT
       "\377\377\377", NULL, },
+    { "\\", NULL, },
+    { "\\\\", "\\\\", false },
+    { "\\\\.", "\\\\", true },
+    { "\\\\\\", NULL, },
+    { "a\\", NULL, },
+    { "a.\\", NULL, },
+    { "a.b\\", NULL, },
   };
 
 static int