From aede6953c1023ad3cdb22d205e57752bbb3a8b48 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 23 May 2013 16:13:08 +0000 Subject: off by one, from Henri Kemppainen , thanks! --- slowcgi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slowcgi.c b/slowcgi.c index 029f64a..a227602 100644 --- a/slowcgi.c +++ b/slowcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slowcgi.c,v 1.2 2013/05/23 13:03:52 jasper Exp $ */ +/* $OpenBSD: slowcgi.c,v 1.3 2013/05/23 16:13:08 florian Exp $ */ /* * Copyright (c) 2013 David Gwynne * Copyright (c) 2013 Florian Obser @@ -623,7 +623,7 @@ parse_params(uint8_t *buf, uint16_t n, struct client *c, uint16_t id) if (val_len < MAXPATHLEN && strcmp(env_entry->val, "SCRIPT_NAME") == 0) { bcopy(buf, c->script_name, val_len); - c->script_name[val_len+1] = '\0'; + c->script_name[val_len] = '\0'; } env_entry->val[name_len] = '='; -- cgit v1.2.3-2-gb3c3