Page MenuHomePhabricator

efl: `eina_value_list_vinsert` assumes that the position is always valid
ClosedPublic

Authored by lucas on Feb 7 2020, 10:07 AM.

Details

Summary

The eina_value_list_vinsert at src/lib/eina_inline_value.x was not checking if the desired position was valid:
When inserting in an empty list in any out of bounds position it actually createded a list with the head being the desired value.
When inserting in a non-empty list in an out of bounds position caused a c error.
Now both cases return EINA_FALSE

Ref T8611

Test Plan

Meson configured with -Dbindings=mono,cxx -Dmono-beta=true, and tests runned
with ninja test all.

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.
lucas created this revision.Feb 7 2020, 10:07 AM
lucas requested review of this revision.Feb 7 2020, 10:07 AM
zmike accepted this revision.Feb 7 2020, 10:14 AM
This revision is now accepted and ready to land.Feb 7 2020, 10:14 AM
This revision was automatically updated to reflect the committed changes.