From dd6464f8f64ba25f428a4d81a592a0223d45ca53 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Aug 2008 15:33:13 +0000 Subject: Fix missing bounds checks in wildcard.cpp causing crash in bug #590 and related Add test cases for wildcards to pick this up in future regression testing plus a bunch of other edge cases git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10147 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/testsuite.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/testsuite.cpp') diff --git a/src/testsuite.cpp b/src/testsuite.cpp index 502f28fd4..ee3346d9d 100644 --- a/src/testsuite.cpp +++ b/src/testsuite.cpp @@ -116,6 +116,8 @@ bool TestSuite::DoWildTests() WCTEST("foobar", "foo*"); WCTEST("foobar", "*bar"); WCTEST("foobar", "foo??r"); + WCTEST("foobar.test", "fo?bar.*t"); + WCTEST("foobar", "foobar"); WCTESTNOT("foobar", "bazqux"); WCTESTNOT("foobar", "*qux"); @@ -123,6 +125,10 @@ bool TestSuite::DoWildTests() WCTESTNOT("foobar", "baz*"); WCTESTNOT("foobar", "foo???r"); WCTESTNOT("foobar", ""); + WCTESTNOT("", "foobar"); + WCTESTNOT("OperServ", "O"); + WCTESTNOT("O", "OperServ"); + WCTESTNOT("foobar.tst", "fo?bar.*g"); CIDRTEST("brain@1.2.3.4", "*@1.2.0.0/16"); CIDRTEST("brain@1.2.3.4", "*@1.2.3.0/24"); -- cgit v1.2.3