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

Issue about possible mistake "bad copypast" #357

Closed
Bbulatov opened this issue Oct 20, 2023 · 1 comment
Closed

Issue about possible mistake "bad copypast" #357

Bbulatov opened this issue Oct 20, 2023 · 1 comment
Labels
bug Something isn't working needs-triage This issue or PR still needs to be triaged.

Comments

@Bbulatov
Copy link

Describe the bug

Hello!
During the static analysis process, a suspicion of a bad copypast error was identified in s3_util.c:208. There is no changes between two blocks (192-196 and 208-214 lines), but in 192 and 208 lines the same instruction: "if (signing_config->service.len > 0) {". I think there should be signed_body_value instead of service in line 208.Please clarify is this right?

Expected Behavior

In line 208:
if (signing_config->signed_body_value.len > 0) {

Current Behavior

In line 208:
if (signing_config->service.len > 0) {

Reproduction Steps

This occurs when calling

struct aws_cached_signing_config_aws *aws_cached_signing_config_new(
struct aws_allocator *allocator,
const struct aws_signing_config_aws *signing_config)

Possible Solution

Change "if (signing_config->service.len > 0) {" to "if (signing_config->signed_body_value.len > 0) {"

Additional Information/Context

No response

aws-c-s3 version used

v0.3.18

Compiler and version used

g++ 8.3.0

Operating System and version

OS Linux Debian

@Bbulatov Bbulatov added bug Something isn't working needs-triage This issue or PR still needs to be triaged. labels Oct 20, 2023
@waahm7
Copy link
Contributor

waahm7 commented Oct 20, 2023

Thank you for creating the issue. We have fixed it in https://github.com/awslabs/aws-c-s3/releases/tag/v0.3.19.

@waahm7 waahm7 closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants