summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.c4
-rw-r--r--mastoapi.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/data.c b/data.c
index bc85171..d3605ef 100644
--- a/data.c
+++ b/data.c
@@ -1017,7 +1017,7 @@ xs_list *timeline_top_level(snac *snac, xs_list *list)
1017 while (xs_list_iter(&p, &v)) { 1017 while (xs_list_iter(&p, &v)) {
1018 char line[256] = ""; 1018 char line[256] = "";
1019 1019
1020 strcpy(line, v); 1020 strncpy(line, v, sizeof(line));
1021 1021
1022 for (;;) { 1022 for (;;) {
1023 char line2[256]; 1023 char line2[256];
@@ -1031,7 +1031,7 @@ xs_list *timeline_top_level(snac *snac, xs_list *list)
1031 break; 1031 break;
1032 1032
1033 /* it's here! try again with its own parent */ 1033 /* it's here! try again with its own parent */
1034 strcpy(line, line2); 1034 strncpy(line, line2, sizeof(line));
1035 } 1035 }
1036 1036
1037 xs_set_add(&seen, line); 1037 xs_set_add(&seen, line);
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,
1064 char pid[64]; 1064 char pid[64];
1065 1065
1066 /* build the [grand]parent list, moving up */ 1066 /* build the [grand]parent list, moving up */
1067 strcpy(pid, id); 1067 strncpy(pid, id, sizeof(pid));
1068 1068
1069 while (object_parent(pid, pid, sizeof(pid))) { 1069 while (object_parent(pid, pid, sizeof(pid))) {
1070 xs *m2 = NULL; 1070 xs *m2 = NULL;