summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index c5c40b9d50..a6c4c875be 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -853,7 +853,7 @@ static bool retrieve(struct tagcache_search *tcs, IF_DIRCACHE(int idx_id,)
853 { 853 {
854 struct tagfile_entry *ep = 854 struct tagfile_entry *ep =
855 (struct tagfile_entry *)&tcramcache.hdr->tags[tag][seek]; 855 (struct tagfile_entry *)&tcramcache.hdr->tags[tag][seek];
856 strlcpy(buf, ep->tag_data, bufsz); 856 strmemccpy(buf, ep->tag_data, bufsz);
857 857
858 return true; 858 return true;
859 } 859 }
@@ -3469,7 +3469,7 @@ static bool write_tag(int fd, const char *tagstr, const char *datastr)
3469 } 3469 }
3470 3470
3471 str_setlen(buf, bufsz - 1); 3471 str_setlen(buf, bufsz - 1);
3472 strlcpy(&buf[i], "\" ", (bufsz - i - 1)); 3472 strmemccpy(&buf[i], "\" ", (bufsz - i - 1));
3473 3473
3474 write(fd, buf, i + 2); 3474 write(fd, buf, i + 2);
3475 3475
@@ -4737,7 +4737,7 @@ void do_tagcache_build(const char *path[])
4737 /* check_dir might add new roots */ 4737 /* check_dir might add new roots */
4738 for(this = &roots_ll[0]; this; this = this->next) 4738 for(this = &roots_ll[0]; this; this = this->next)
4739 { 4739 {
4740 strlcpy(curpath, this->path, sizeof(curpath)); 4740 strmemccpy(curpath, this->path, sizeof(curpath));
4741 ret = ret && check_dir(this->path, true); 4741 ret = ret && check_dir(this->path, true);
4742 } 4742 }
4743 free_search_roots(&roots_ll[0]); 4743 free_search_roots(&roots_ll[0]);
@@ -4792,7 +4792,7 @@ void tagcache_build(void)
4792{ 4792{
4793 char *vect[MAX_STATIC_ROOTS + 1]; /* +1 to ensure NULL sentinel */ 4793 char *vect[MAX_STATIC_ROOTS + 1]; /* +1 to ensure NULL sentinel */
4794 char str[sizeof(global_settings.tagcache_scan_paths)]; 4794 char str[sizeof(global_settings.tagcache_scan_paths)];
4795 strlcpy(str, global_settings.tagcache_scan_paths, sizeof(str)); 4795 strmemccpy(str, global_settings.tagcache_scan_paths, sizeof(str));
4796 4796
4797 int res = split_string(str, ':', vect, MAX_STATIC_ROOTS); 4797 int res = split_string(str, ':', vect, MAX_STATIC_ROOTS);
4798 vect[res] = NULL; 4798 vect[res] = NULL;