summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--post.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/post.c b/post.c
index 3f4df04..27df0dc 100644
--- a/post.c
+++ b/post.c
@@ -47,7 +47,9 @@ void read_post_data(void)
int pos = 0;
int c;
- while ((c = getchar()) != EOF) {
+ buf[0] = '\0';
+
+ while (pos < cl && (c = getchar()) != EOF) {
if (c == '&') {
add_data(buf);
pos = 0;