diff options
Diffstat (limited to 'test/tokeniser3.c')
-rw-r--r-- | test/tokeniser3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/tokeniser3.c b/test/tokeniser3.c index 58a1f34..c74c9aa 100644 --- a/test/tokeniser3.c +++ b/test/tokeniser3.c @@ -141,7 +141,7 @@ void run_test(context *ctx) if (ctx->last_start_tag != NULL) { /* Fake up a start tag, in PCDATA state */ size_t len = strlen(ctx->last_start_tag) + 3; - uint8_t *buf = alloca(len); + uint8_t *buf = malloc(len); snprintf((char *) buf, len, "<%s>", ctx->last_start_tag); @@ -150,6 +150,8 @@ void run_test(context *ctx) buf, len - 1) == HUBBUB_OK); assert(hubbub_tokeniser_run(tok) == HUBBUB_OK); + + free(buf); } if (ctx->process_cdata) { |