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

rgw: Fix potential null dereference in rgw/driver/dbstore/sqlite/statement.cc #52474

Merged
merged 1 commit into from Dec 17, 2023

Conversation

vedanshbhartia
Copy link
Contributor

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@vedanshbhartia vedanshbhartia requested a review from a team as a code owner July 16, 2023 16:23
@github-actions github-actions bot added the rgw label Jul 16, 2023
@yuvalif
Copy link
Contributor

yuvalif commented Jul 17, 2023

@vedanshbhartia compilation fails here: https://jenkins.ceph.com/job/ceph-pull-requests/118353/consoleFull#-15211463532a811ea2-3e7b-466b-84b4-d13df7e35809
you probably need to make sure that both true/false options of the ternary expression are of ther same type (std::string?)

@vedanshbhartia
Copy link
Contributor Author

@vedanshbhartia compilation fails here: https://jenkins.ceph.com/job/ceph-pull-requests/118353/consoleFull#-15211463532a811ea2-3e7b-466b-84b4-d13df7e35809 you probably need to make sure that both true/false options of the ternary expression are of ther same type (std::string?)

sql.get() return a char pointer, but it is defined via a template as follows:

template <typename T>
using sqlite_ptr = std::unique_ptr<T, sqlite_deleter>;

The compiler interprets this as <unresolved overloaded function type> in the ternary operator. Not sure how to fix this.

@yuvalif
Copy link
Contributor

yuvalif commented Jul 17, 2023

@vedanshbhartia compilation fails here: https://jenkins.ceph.com/job/ceph-pull-requests/118353/consoleFull#-15211463532a811ea2-3e7b-466b-84b4-d13df7e35809 you probably need to make sure that both true/false options of the ternary expression are of ther same type (std::string?)

sql.get() return a char pointer, but it is defined via a template as follows:

template <typename T>
using sqlite_ptr = std::unique_ptr<T, sqlite_deleter>;

The compiler interprets this as <unresolved overloaded function type> in the ternary operator. Not sure how to fix this.

maybe static_cast<char*> would help?

@yuvalif
Copy link
Contributor

yuvalif commented Jul 24, 2023

@vedanshbhartia did the casting help?

…ement.cc

Signed-off-by: Vedansh Bhartia <vedanshbhartia@gmail.com>
@vedanshbhartia
Copy link
Contributor Author

@vedanshbhartia did the casting help?

The issue was with the operator precedence. Adding parentheses fixed it

@yuvalif
Copy link
Contributor

yuvalif commented Oct 9, 2023

@yuvalif
Copy link
Contributor

yuvalif commented Oct 9, 2023

jenkins test windows

Copy link

github-actions bot commented Dec 8, 2023

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Dec 8, 2023
@yuvalif
Copy link
Contributor

yuvalif commented Dec 9, 2023

unstale please

@github-actions github-actions bot removed the stale label Dec 9, 2023
@yuvalif
Copy link
Contributor

yuvalif commented Dec 17, 2023

test results. see: #52276 (comment)

@yuvalif yuvalif merged commit 0e36db9 into ceph:main Dec 17, 2023
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants