Skip to content

Commit 04f26b2

Browse files
committed
Checking for dereference of a null pointer (loaded from variable 't')
Fixes: https://tracker.ceph.com/issues/68029 Signed-off-by: Suyash Dongre <[email protected]>
1 parent fc70b44 commit 04f26b2

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)