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

Skip to content
Commit ce9a26eb authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

Fix a crash happening in NBLog's 'writeHistToFile'

The issue was in the possibility of the 'intervals' vector being
empty if the provided 'samples' vector contains only one
element. That leads to 'intervals.end()' being passed to
'intervals.erase()', and vector::erase produces undefined
behaviour in that case.

I see no other calls to 'erase' or 'max_element' in libnbaio,
so that should be the only fix needed.

Bug: 62536501
Test: see test case at bug
Change-Id: I37f93fa42030ed6f5bcb2d46b0a7a2c0af3c82e4
parent af842eb7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment