Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: recursive file joiner read #2481

Merged
merged 4 commits into from
Sep 9, 2021
Merged

fix: recursive file joiner read #2481

merged 4 commits into from
Sep 9, 2021

Conversation

notanatol
Copy link
Contributor

@notanatol notanatol commented Sep 7, 2021

SWA-01-010 WP2: Unbounded recursion in file joiner (Medium)

While reviewing the file joiner implementation, it was found that the code allows for an
unbounded recursive call.

This change is Reviewable

@notanatol notanatol marked this pull request as draft September 7, 2021 14:42
Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @notanatol)


pkg/file/joiner/joiner.go, line 93 at r3 (raw file):

}

var ErrMalformedTrie = errors.New("subtrie span is over the limit")

I'd suggest renaming the error to reflect more the cause, something like ErrSubtrieSpanLimitExceeded or something similar.

@notanatol notanatol marked this pull request as ready for review September 9, 2021 11:56
pkg/file/joiner/joiner.go Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 9, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@notanatol notanatol merged commit 568b23f into master Sep 9, 2021
@notanatol notanatol deleted the file-joiner branch September 9, 2021 14:43
@acud acud added this to the v1.2.0 milestone Sep 30, 2021
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.

3 participants