Page MenuHomePhabricator

eldbus: Fix dereference after null check
ClosedPublic

Authored by devilhorns on Thu, Mar 14, 10:14 AM.

Details

Summary

Coverity reports we are passing NULL variable 'properties' to
eina_array_pop here which dereferences it. Wrap the 'end' block in an
if which checks for valid 'properties' variable

Fixes Coverity CID1399422

@fix

Depends on D8350

Diff Detail

Repository
rEFL core/efl
Branch
devs/devilhorns/coverity
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10332
devilhorns created this revision.Thu, Mar 14, 10:14 AM
devilhorns requested review of this revision.Thu, Mar 14, 10:14 AM
cedric requested changes to this revision.Thu, Mar 14, 3:39 PM
cedric added inline comments.
src/lib/eldbus/eldbus_model_proxy.c
672

To avoid nesting to much block, you could just do an :

if (!properties) return ;
This revision now requires changes to proceed.Thu, Mar 14, 3:39 PM
devilhorns updated this revision to Diff 20616.Fri, Mar 15, 5:55 AM
devilhorns edited the summary of this revision. (Show Details)

rebase

devilhorns marked an inline comment as done.Fri, Mar 15, 6:00 AM
devilhorns updated this revision to Diff 20623.Fri, Mar 15, 6:02 AM

Update based on review comments

cedric accepted this revision.Fri, Mar 15, 9:01 AM
This revision is now accepted and ready to land.Fri, Mar 15, 9:01 AM
devilhorns closed this revision.Fri, Mar 15, 9:13 AM