From 34d85b3e1bbda2e89191026b3815dd9b6f23afcb Mon Sep 17 00:00:00 2001 From: grunfink Date: Thu, 29 May 2025 13:12:43 +0200 Subject: mastoapi: fixed uploaded images name collision. --- html.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index 3d213a2..56dc2cc 100644 --- a/html.c +++ b/html.c @@ -4362,7 +4362,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, xs_rnd_buf(rnd, sizeof(rnd)); const char *ext = strrchr(fn, '.'); - xs *hash = xs_md5_hex(rnd, strlen(rnd)); + xs *hash = xs_md5_hex(rnd, sizeof(rnd)); xs *id = xs_fmt("post-%s%s", hash, ext ? ext : ""); xs *url = xs_fmt("%s/s/%s", snac.actor, id); int fo = xs_number_get(xs_list_get(attach_file, 1)); -- cgit v1.2.3