diff options
author | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2003-05-28 04:39:42 +0000 |
---|---|---|
committer | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2003-05-28 04:39:42 +0000 |
commit | ca6809f67e9a53a1dfb980e61cff77526608b4b4 (patch) | |
tree | 9e1c45f378deb1615eaffed1eb7fb507bfb84cec /test | |
parent | 220c6e4ea2e1c9b1d02fd9e974f204d384b96e53 (diff) | |
download | libapr-ca6809f67e9a53a1dfb980e61cff77526608b4b4.tar.gz |
Fixed a bug that could be triggered remotely through mod_dav and possibly other
mechanisms, causing an Apache child process to crash. The crash was first
reported by David Endler <DEndler@iDefense.com> and was researched and fixed by
Joe Orton <jorton@redhat.com>. Details will be released on 30 May 2003.
CVE: CAN-2003-0245
Reported by: David Endler <DEndler@iDefense.com>
Submitted by: Joe Orton <jorton@redhat.com>
Reviewed by: Justin, Jim, Jeff
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64511 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/teststr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/teststr.c b/test/teststr.c index 2c4a3c154..e38c1f377 100644 --- a/test/teststr.c +++ b/test/teststr.c @@ -195,6 +195,17 @@ static void string_error(CuTest *tc) CuAssertStrEquals(tc, "The timeout specified has expired", buf); } +#define SIZE 180000 +static void string_long(CuTest *tc) +{ + char s[SIZE + 1]; + + memset(s, 'A', SIZE); + s[SIZE] = '\0'; + + apr_psprintf(p, "%s", s); +} + CuSuite *teststr(void) { CuSuite *suite = CuSuiteNew("Strings"); @@ -205,6 +216,7 @@ CuSuite *teststr(void) SUITE_ADD_TEST(suite, snprintf_int64); SUITE_ADD_TEST(suite, test_strtok); SUITE_ADD_TEST(suite, string_error); + SUITE_ADD_TEST(suite, string_long); return suite; } |