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
Loading
Please register or sign in to comment