From 589634d26bea6cc73aa059f8f6c10c1228e6b1da Mon Sep 17 00:00:00 2001 From: the little girl Date: Fri, 11 Nov 2016 02:24:43 +0900 Subject: =?UTF-8?q?m=C3=A5=20kanskje=20kunne=20bygges=20ogs=C3=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ukulele.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ukulele.c b/ukulele.c index ce12dff..133d30a 100644 --- a/ukulele.c +++ b/ukulele.c @@ -141,10 +141,10 @@ int store(char *raw, int len) { char *id = basename(strdup(raw)); if(chdir(dir)) return problem(404, "Not found"); - size_t len = strlen(loft) + strlen(id) + 256; - char path[len]; + size_t siz = strlen(loft) + strlen(id) + 256; + char path[siz]; time_t epoch = time(0); - snprintf(path, len, "%s/%s.%d", loft, id, (int) epoch); + snprintf(path, siz, "%s/%s.%d", loft, id, (int) epoch); FILE *fp = fopen(path, "w"); if(!fp) return redirect("fff", 0); int pos = 0; -- cgit v1.0