Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1dfb086c authored by Alessandro Astone's avatar Alessandro Astone
Browse files

updater: Do not null terminate mount_flags_list array

mount_flags_list is a c-style NULL terminated array, but when
iterating over it via
    for (const auto& [name, value] : mount_flags_list)
the last { 0, 0 } is considered a valid entry.
Then `name` is NULL but checked with (flag == name),
which causes SIGSEGV.

Also move the definition to within setMountFlag()
and make it an std::pair array

Change-Id: Ia6670113620c6e8f95151fda764c3ab40bc2d67e
parent 1055a2f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment