Skip to content

Fix potential Longtail_GetFilesRecursively2 buffer overrun.#252

Merged
DanEngelbrecht merged 3 commits into
DanEngelbrecht:mainfrom
webbju:webbju/fix-jobapi-path-exclusion-trample
Jun 28, 2025
Merged

Fix potential Longtail_GetFilesRecursively2 buffer overrun.#252
DanEngelbrecht merged 3 commits into
DanEngelbrecht:mainfrom
webbju:webbju/fix-jobapi-path-exclusion-trample

Conversation

@webbju

@webbju webbju commented Jun 26, 2025

Copy link
Copy Markdown
Contributor
  • Fix potential buffer overrun during Longtail_GetFilesRecursively2 when using a Job API.
    • The working buffer length calculation filters paths using IncludeFoundFile where as setup of job_contexts does not. This can lead to length inconsistencies. I managed to expose this by excluding certain directories via Regex (through golongtail CLI) which meant that LONGTAIL_FATAL_ASSERT(ctx, job_index == job_count, return ENOMEM); is hit when running golongtail with a debug static library (job_index > job_count). If not debug, exits with code 0xc0000374.

@webbju webbju marked this pull request as ready for review June 26, 2025 13:04
@DanEngelbrecht DanEngelbrecht merged commit 8a78aac into DanEngelbrecht:main Jun 28, 2025
37 checks passed
@webbju webbju deleted the webbju/fix-jobapi-path-exclusion-trample branch June 30, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants