Page MenuHomePhabricator

efl_ui_collection: protect against invalid access
ClosedPublic

Authored by bu5hm4n on Sep 21 2019, 2:59 AM.

Details

Summary

i am not sure why this should ever happen. However, a error here is
better than a access out of the bounds of the array.

Depends on D10065

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bu5hm4n created this revision.Sep 21 2019, 2:59 AM
bu5hm4n requested review of this revision.Sep 21 2019, 2:59 AM
zmike requested changes to this revision.Sep 21 2019, 9:17 AM
zmike added a subscriber: zmike.

This is broken if a negative value is passed. Can the int param be changed to uint to resolve this?

This revision now requires changes to proceed.Sep 21 2019, 9:17 AM
bu5hm4n updated this revision to Diff 25313.Sep 21 2019, 9:31 AM
bu5hm4n edited the summary of this revision. (Show Details)

int -> unsigned int

zmike accepted this revision.Sep 21 2019, 9:40 AM

Yea but it's just gonna show up on a static analyzer otherwise. You can remove the now-unnecessary cast when landing if you want.

This revision is now accepted and ready to land.Sep 21 2019, 9:40 AM
Closed by commit rEFL18e9a224beed: efl_ui_collection: protect against invalid access (authored by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhySep 21 2019, 11:44 AM
This revision was automatically updated to reflect the committed changes.