diff options
| author | 2023-04-16 20:12:44 +0200 | |
|---|---|---|
| committer | 2023-04-16 20:12:44 +0200 | |
| commit | 8205159f8ca98f525d892c02eb7dadfdf6d446d4 (patch) | |
| tree | 540cd5bdb3e578f208f8d0efef3eaaae211057ea /data.c | |
| parent | Updated documentation. (diff) | |
| download | snac2-8205159f8ca98f525d892c02eb7dadfdf6d446d4.tar.gz snac2-8205159f8ca98f525d892c02eb7dadfdf6d446d4.tar.xz snac2-8205159f8ca98f525d892c02eb7dadfdf6d446d4.zip | |
Replaced strcpy() with strncpy().
To shut up some compiler whining.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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); |