[xiph-commits] r13402 - experimental/moritz/thread
moritz at svn.xiph.org
moritz at svn.xiph.org
Mon Jul 30 08:29:06 PDT 2007
Author: moritz
Date: 2007-07-30 08:29:06 -0700 (Mon, 30 Jul 2007)
New Revision: 13402
Modified:
experimental/moritz/thread/main.c
Log:
Add a double-free and a negative realloc.
Modified: experimental/moritz/thread/main.c
===================================================================
--- experimental/moritz/thread/main.c 2007-07-30 15:06:30 UTC (rev 13401)
+++ experimental/moritz/thread/main.c 2007-07-30 15:29:06 UTC (rev 13402)
@@ -24,7 +24,7 @@
char *foo, *bar, *baz, *bla;
#ifdef XALLOC_DEBUG
- xalloc_initialize_debug(2, stdout);
+ xalloc_initialize_debug(1, stdout);
#else
xalloc_initialize();
#endif
@@ -42,10 +42,12 @@
foo = xstrdup("FooFooFooFooFoo!");
bar = xcalloc(12, sizeof(char));
baz = xmalloc(80);
+ baz = xrealloc(baz, 200, sizeof(char));
baz = xrealloc(baz, 100, sizeof(char));
xasprintf(&bla, "Blabla? Blah-%d!", 1000);
xfree(foo);
xfree(baz);
+ xfree(baz);
thread_shutdown();
xalloc_shutdown();
More information about the commits
mailing list