From 8205159f8ca98f525d892c02eb7dadfdf6d446d4 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 16 Apr 2023 20:12:44 +0200 Subject: Replaced strcpy() with strncpy(). To shut up some compiler whining. --- mastoapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mastoapi.c') diff --git a/mastoapi.c b/mastoapi.c index d185627..af8fb27 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -1064,7 +1064,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, char pid[64]; /* build the [grand]parent list, moving up */ - strcpy(pid, id); + strncpy(pid, id, sizeof(pid)); while (object_parent(pid, pid, sizeof(pid))) { xs *m2 = NULL; -- cgit v1.2.3