From 8656393c5cbc5171e5baa30bc79fe13ffa0f406d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 21 Oct 2008 13:54:48 -0400 Subject: Fix a nasty driver bug, involving memory restarts and marked-up request strings --- src/c/driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/c/driver.c') diff --git a/src/c/driver.c b/src/c/driver.c index 705bb613..94436298 100644 --- a/src/c/driver.c +++ b/src/c/driver.c @@ -116,7 +116,7 @@ static void *worker(void *data) { *back = 0; if (s = strstr(buf, "\r\n\r\n")) { - char *cmd, *path, *inputs; + char *cmd, *path, path_copy[uw_bufsize+1], *inputs; *s = 0; @@ -175,7 +175,8 @@ static void *worker(void *data) { uw_write(ctx, "Content-type: text/html\r\n\r\n"); uw_write(ctx, ""); - fk = uw_begin(ctx, path); + strcpy(path_copy, path); + fk = uw_begin(ctx, path_copy); if (fk == SUCCESS) { uw_write(ctx, ""); break; -- cgit v1.2.3