Skip to content

New IO utils and Base64 fixes - #286

Open
aidankeefe2022 wants to merge 4 commits into
wolfSSL:mainfrom
aidankeefe2022:fenrir-11088
Open

aidankeefe2022 wants to merge 4 commits into
wolfSSL:mainfrom
aidankeefe2022:fenrir-11088

Conversation

@aidankeefe2022

@aidankeefe2022 aidankeefe2022 commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Added read/write io functions that can be used to interact with any file pointer

Fix for Fenrir finding : https://fenrir.wolfssl.com/finding/11088

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-bugs, wolfclu-src

Findings: 4
4 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_base64.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_base64.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-bugs, wolfclu-src

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-bugs, wolfclu-src

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-src, wolfclu-bugs

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-src, wolfclu-bugs

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/tools/clu_io.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-src, wolfclu-bugs

Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread wolfclu/clu_header_main.h Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
@aidankeefe2022
aidankeefe2022 dismissed wolfSSL-Fenrir-bot’s stale review September 11, 2026 21:47

Picking on future feature to allow wolfCLU to not need filesystem not in scope for this fix

@aidankeefe2022

Copy link
Copy Markdown
Member Author

Planning on expanding this file interface to the rest of the codebase but for now starting with base64

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #286

Scan targets checked: wolfclu-src, wolfclu-bugs

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread wolfclu/clu_io.h Outdated
Comment thread src/tools/clu_io.c Outdated
added more tests for io for base64 and rewrote IO system for base64
looking to extend in the future
Copilot AI balanced review requested due to automatic review settings October 1, 2026 21:48
@aidankeefe2022 aidankeefe2022 changed the title Fenrir Fix: Base64 stdin input is silently truncated at 8000 bytes New IO utils and Base64 fixes Oct 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Large-stream capacity handling is not portable, and several intended buffer-boundary tests target incorrect sizes.

Review effort: Balanced
Findings: 1 Medium severity · 3 Low severity

Open (4)
What changed in this PR

Adds reusable file/stream I/O to prevent Base64 stdin truncation.

Changes:

  • Introduces dynamically growing I/O helpers.
  • Migrates Base64 processing to the new helpers.
  • Adds build integration and expanded regression tests.
File Description
wolfclu/​include.am Installs the new header.
wolfclu/​clu_io.h Defines the public I/O API.
src/​tools/​clu_io.c Implements stream/file operations.
src/​tools/​clu_base64.c Uses the new I/O abstraction.
src/​include.am Adds the implementation to Autotools.
wolfCLU.vcxproj Adds files to the Visual Studio build.
wolfCLU.vcxproj.filters Categorizes the new project files.
tests/​base64/​base64-test.py Adds long-input and I/O regression coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread src/tools/clu_io.c Outdated
Comment thread tests/base64/base64-test.py Outdated
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.

4 participants