tvote.c: remove raw representation of poll parameter - vote - simple cgi voting system for web and gopher (HTM) git clone git://src.adamsgaard.dk/vote (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit c7fdf4bc6fe1740d10b874ce6da7005f7ca46635 (DIR) parent a813862768457b63444e4006b480ec4627a4cd77 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk> 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(-) --- (DIR) 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); }