Skip to content

Commit 65433f9

Browse files
authored
Merge pull request ceph#59731 from Suyashd999/fix-ndf1
rgw/rgw_iam_policy: Checking for dereference of a null pointer (loaded from variable 't') Reviewed-By: Adam Emerson <[email protected]>, Yuval Lifshitz <[email protected]>
2 parents d0ec1c6 + 04f26b2 commit 65433f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rgw/rgw_iam_policy.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ bool ParseState::do_string(CephContext* cct, const char* s, size_t l) {
596596
bool is_action = false;
597597
bool is_valid_action = false;
598598
Statement* t = p.statements.empty() ? nullptr : &(p.statements.back());
599+
ceph_assert(t || w->id == TokenID::Version || w->id == TokenID::Id);
599600

600601
// Top level!
601602
if (w->id == TokenID::Version) {

0 commit comments

Comments
 (0)