diff options
-rw-r--r-- | apps/tagcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index b0c2eac28f..b12d1de7f6 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -1921,7 +1921,7 @@ static bool get_next(struct tagcache_search *tcs, bool is_numeric, char *buf, lo | |||
1921 | if (tcs->type == tag_filename && (flag & FLAG_DIRCACHE)) | 1921 | if (tcs->type == tag_filename && (flag & FLAG_DIRCACHE)) |
1922 | { | 1922 | { |
1923 | ssize_t len = dircache_get_fileref_path(&tcrc_dcfrefs[tcs->idx_id], | 1923 | ssize_t len = dircache_get_fileref_path(&tcrc_dcfrefs[tcs->idx_id], |
1924 | buf, sizeof (buf)); | 1924 | buf, bufsz); |
1925 | if (len >= 0) | 1925 | if (len >= 0) |
1926 | { | 1926 | { |
1927 | tcs->result_len = len + 1; | 1927 | tcs->result_len = len + 1; |
@@ -1939,7 +1939,7 @@ static bool get_next(struct tagcache_search *tcs, bool is_numeric, char *buf, lo | |||
1939 | 1939 | ||
1940 | ep = (struct tagfile_entry *)&tcramcache.hdr->tags[tcs->type][tcs->position]; | 1940 | ep = (struct tagfile_entry *)&tcramcache.hdr->tags[tcs->type][tcs->position]; |
1941 | /* don't return ep->tag_data directly as it may move */ | 1941 | /* don't return ep->tag_data directly as it may move */ |
1942 | tcs->result_len = strlcpy(buf, ep->tag_data, sizeof(buf)) + 1; | 1942 | tcs->result_len = strlcpy(buf, ep->tag_data, bufsz) + 1; |
1943 | tcs->result = buf; | 1943 | tcs->result = buf; |
1944 | tcs->idx_id = ep->idx_id; | 1944 | tcs->idx_id = ep->idx_id; |
1945 | tcs->ramresult = false; /* was true before we copied to buf too */ | 1945 | tcs->ramresult = false; /* was true before we copied to buf too */ |