diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-11-05 19:14:30 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-11-05 19:14:30 -0500 |
| commit | 5536f403a75284b986deec7c4585a9b98ab13bef (patch) | |
| tree | 6011e61c44845aa969bfc8433c70dcb3786c66f9 | |
| parent | b87214ebdb830d6f5f7768d03e517894bc563053 (diff) | |
| download | stasis-5536f403a75284b986deec7c4585a9b98ab13bef.tar.gz | |
CANARYindexer-buffer-overlow
| -rw-r--r-- | src/cli/stasis_indexer/stasis_indexer_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c index e674a5a..ca0fc07 100644 --- a/src/cli/stasis_indexer/stasis_indexer_main.c +++ b/src/cli/stasis_indexer/stasis_indexer_main.c @@ -47,22 +47,26 @@ int indexer_combine_rootdirs(const char *dest, char **rootdirs, const size_t roo fprintf(stderr, "%s does not exist\n", srcdir_bare); continue; } + puts("done"); puts("access srcdir_with_output"); if (!access(srcdir_with_output, F_OK)) { srcdir = srcdir_with_output; } + puts("done"); puts("snprintf 2"); printf("cmd = %s\n", cmd); printf("cmd len = %zu\n", strlen(cmd)); printf("cmd size = %zu\n", sizeof(cmd)); - printf("cmd maxlen = %zu\n", sizeof(cmd) - strlen(cmd) + 4); + printf("cmd maxlen = %zu\n", sizeof(cmd) - strlen(cmd)); printf("srcdir = %s\n", srcdir); - snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd) + 4, "'%s'/ ", srcdir); + snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd), "'%s'/ ", srcdir); + puts("done"); puts(cmd); } puts("snprintf 3"); - snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd) + 2, " %s/", destdir); + snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd), " %s/", destdir); + puts("done"); if (globals.verbose) { puts(cmd); @@ -72,6 +76,7 @@ int indexer_combine_rootdirs(const char *dest, char **rootdirs, const size_t roo if (system(cmd)) { return -1; } + puts("done"); return 0; } |
