mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Replaced strcpy() with strncpy().
To shut up some compiler whining.
This commit is contained in:
parent
80cd4eaada
commit
8205159f8c
4
data.c
4
data.c
@ -1017,7 +1017,7 @@ xs_list *timeline_top_level(snac *snac, xs_list *list)
|
|||||||
while (xs_list_iter(&p, &v)) {
|
while (xs_list_iter(&p, &v)) {
|
||||||
char line[256] = "";
|
char line[256] = "";
|
||||||
|
|
||||||
strcpy(line, v);
|
strncpy(line, v, sizeof(line));
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char line2[256];
|
char line2[256];
|
||||||
@ -1031,7 +1031,7 @@ xs_list *timeline_top_level(snac *snac, xs_list *list)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* it's here! try again with its own parent */
|
/* it's here! try again with its own parent */
|
||||||
strcpy(line, line2);
|
strncpy(line, line2, sizeof(line));
|
||||||
}
|
}
|
||||||
|
|
||||||
xs_set_add(&seen, line);
|
xs_set_add(&seen, line);
|
||||||
|
@ -1064,7 +1064,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
|||||||
char pid[64];
|
char pid[64];
|
||||||
|
|
||||||
/* build the [grand]parent list, moving up */
|
/* build the [grand]parent list, moving up */
|
||||||
strcpy(pid, id);
|
strncpy(pid, id, sizeof(pid));
|
||||||
|
|
||||||
while (object_parent(pid, pid, sizeof(pid))) {
|
while (object_parent(pid, pid, sizeof(pid))) {
|
||||||
xs *m2 = NULL;
|
xs *m2 = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user