tvote.c: remove raw representation of poll parameter - vote - simple cgi voting… | |
git clone git://src.adamsgaard.dk/vote | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c7fdf4bc6fe1740d10b874ce6da7005f7ca46635 | |
parent a813862768457b63444e4006b480ec4627a4cd77 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 27 Sep 2020 08:11:31 +0200 | |
vote.c: remove raw representation of poll parameter | |
Diffstat: | |
M vote.c | 7 +------ | |
1 file changed, 1 insertion(+), 6 deletions(-) | |
--- | |
diff --git a/vote.c b/vote.c | |
t@@ -10,7 +10,7 @@ | |
#define OUT(s) (fputs((s), stdout)) | |
#define POLLS_DIR "polls" | |
-static char rawpoll[1024], poll[1024]; | |
+static char poll[1024]; | |
void | |
die(int statuscode) | |
t@@ -69,11 +69,6 @@ parse_query() | |
query = ""; | |
if ((p = getparam(query, "poll"))) { | |
- if ((len = strcspn(p, "&")) && len + 1 < sizeof(rawpoll)) { | |
- memcpy(rawpoll, p, len); | |
- rawpoll[len] = '\0'; | |
- } | |
- | |
if (decodeparam(poll, sizeof(poll), p) == -1) { | |
die(401); | |
} |