summaryrefslogtreecommitdiff
path: root/src/htsindex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/htsindex.c')
-rw-r--r--src/htsindex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/htsindex.c b/src/htsindex.c
index 4055ca6..1d08012 100644
--- a/src/htsindex.c
+++ b/src/htsindex.c
@@ -161,8 +161,8 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
// Init ?
if (hts_index_init) {
- UNLINK(concat(catbuff, indexpath, "index.txt"));
- UNLINK(concat(catbuff, indexpath, "sindex.html"));
+ UNLINK(concat(catbuff, sizeof(catbuff), indexpath, "index.txt"));
+ UNLINK(concat(catbuff, sizeof(catbuff), indexpath, "sindex.html"));
hts_index_init = 0;
}
// Check MIME type
@@ -291,7 +291,7 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
e++; /* 0 means "once" */
- if (strncmp((const char *) fslash(catbuff, (char *) indexpath), filename, strlen(indexpath)) == 0) // couper
+ if (strncmp((const char *) fslash(catbuff, sizeof(catbuff), (char *) indexpath), filename, strlen(indexpath)) == 0) // couper
strcpybuff(savelst, filename + strlen(indexpath));
else
strcpybuff(savelst, filename);
@@ -358,9 +358,9 @@ void index_finish(const char *indexpath, int mode) {
// Write new file
if (mode == 1) // TEXT
- fp = fopen(concat(catbuff, indexpath, "index.txt"), "wb");
+ fp = fopen(concat(catbuff, sizeof(catbuff), indexpath, "index.txt"), "wb");
else // HTML
- fp = fopen(concat(catbuff, indexpath, "sindex.html"), "wb");
+ fp = fopen(concat(catbuff, sizeof(catbuff), indexpath, "sindex.html"), "wb");
if (fp) {
char current_word[KEYW_LEN + 32];
char word[KEYW_LEN + 32];