aboutsummaryrefslogtreecommitdiff
path: root/regress/iri_test.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-07-02 17:47:51 +0000
committerOmar Polo <op@omarpolo.com>2024-07-02 17:47:51 +0000
commita1ef2acc86f58b0fd44ffd8ed6c5176fb500d45e (patch)
tree308a4fd2d38468de4d9a662413cf5f08083c3912 /regress/iri_test.c
parentd0fed6eb088ab7f0eec876aea0bb98327c77c2bb (diff)
add a few tests found by afl
Diffstat (limited to 'regress/iri_test.c')
-rw-r--r--regress/iri_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/regress/iri_test.c b/regress/iri_test.c
index cbe3b1a..4df2b70 100644
--- a/regress/iri_test.c
+++ b/regress/iri_test.c
@@ -301,5 +301,15 @@ main(void)
empty,
"reject invalid sequence (overlong NUL)");
+ /* hangs in previous versions found by afl */
+ TEST("http://omarpolo3com/f.././",
+ PASS,
+ IRI("http", "omarpolo3com", "", "f../", "", ""),
+ "does not get confused by paths that contains '..'.");
+ TEST("lttp://oOarpols*czm/~../.R",
+ PASS,
+ IRI("lttp", "ooarpols*czm", "", "~../.R", "", ""),
+ "does not get confused by paths that contains '..'.");
+
return 0;
}