Skip to content

Commit

Permalink
Fix critical KW issue
Browse files Browse the repository at this point in the history
1): Do null check for pointer 'edid' before dereferenced.
2): Do null check for pointer 'buffer' before dereferenced.

Tracked-On: https://jira01.devtools.intel.com/browse/OAM-70809
Tested-by: build test and kw scan check
Signed-off-by: Jenny Cao <jenny.q.cao@intel.com>
  • Loading branch information
jennycao authored and stripes416 committed Nov 6, 2018
1 parent 6abc4fc commit 9faeba3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/core/overlaylayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ void OverlayLayer::ValidatePreviousFrameState(OverlayLayer* rhs,
if (!rhs->imported_buffer_.get()) {
state_ |= kNeedsReValidation;
return;
} else if (buffer->GetFormat() !=
rhs->imported_buffer_->buffer_->GetFormat()) {
} else if (buffer && (buffer->GetFormat() !=
rhs->imported_buffer_->buffer_->GetFormat())) {
state_ |= kNeedsReValidation;
return;
}
Expand Down
4 changes: 4 additions & 0 deletions wsi/drm/drmdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ void DrmDisplay::DrmConnectorGetDCIP3Support(
}

edid = (uint8_t *)blob->data;
if (!edid) {
return;
}

blocks = FindExtendedBlocksForTag(edid, CTA_EXTENDED_TAG_CODE);

for (uint8_t *ext_block : blocks) {
Expand Down

0 comments on commit 9faeba3

Please sign in to comment.