Skip to content

out_azure_blob: increase buffer path buffer size#12138

Open
locker95 wants to merge 1 commit into
fluent:masterfrom
locker95:fix/azure-blob-buffer-dir-name-size
Open

out_azure_blob: increase buffer path buffer size#12138
locker95 wants to merge 1 commit into
fluent:masterfrom
locker95:fix/azure-blob-buffer-dir-name-size

Conversation

@locker95

@locker95 locker95 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

In azure_blob_store_init(), buffer_dir and azure_blob_buffer_key are joined into a fixed stack buffer before calling flb_fstore_create(). That buffer was only 64 bytes, so longer directory paths were truncated via snprintf.

Increase the buffer to 1024 bytes (common path-sized stack buffers elsewhere in the tree). Bounds remain enforced with snprintf(..., sizeof(tmp), ...).

Fixes #12062

Changes

  • plugins/out_azure_blob/azure_blob_store.c: char tmp[64]char tmp[1024]

Testing

  • Change is a stack buffer size increase only; existing snprintf / strftime call sites already use sizeof(tmp).
  • Not run full Fluent Bit build here (minimal one-line fix).

Checklist

  • Signed-off-by present
  • GPG signed commit
  • Linked issue with Fixes

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of long Azure Blob Storage paths and stream names to reduce the risk of filename truncation.

buffer_dir and azure_blob_buffer_key are joined into a fixed stack
buffer in azure_blob_store_init(). Size 64 truncates longer paths;
use 1024 and keep snprintf bounds via sizeof(tmp).

Fixes fluent#12062

Signed-off-by: Dean Chen <862469039@qq.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7510bb17-4202-415d-b068-fddf728bdc65

📥 Commits

Reviewing files that changed from the base of the PR and between c830fb6 and c5df775.

📒 Files selected for processing (1)
  • plugins/out_azure_blob/azure_blob_store.c

📝 Walkthrough

Walkthrough

The Azure Blob store initialization increases its temporary path buffer from 64 to 1024 bytes when composing storage directory and stream names.

Changes

Azure Blob buffer sizing

Layer / File(s) Summary
Expand Azure Blob temporary buffer
plugins/out_azure_blob/azure_blob_store.c
The local buffer used for formatted directory and stream names is increased from 64 to 1024 bytes.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: cosmo0920

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: increasing the Azure Blob path buffer size.
Linked Issues check ✅ Passed The change matches issue #12062 by raising the directory buffer from 64 to 1024 bytes in azure_blob_store_init().
Out of Scope Changes check ✅ Passed The PR is narrowly scoped to the buffer size fix and does not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

out_azure_blob: increase buffer dir name size to avoid truncating the directory

1 participant