Home
last modified time | relevance | path

Searched hist:"3 f57b13504ec30f19ec617feac42f1f69736967b" (Results 1 – 1 of 1) sorted by relevance

/haiku/src/apps/activitymonitor/
H A DActivityView.cpp3f57b13504ec30f19ec617feac42f1f69736967b Wed Nov 26 11:16:57 UTC 2014 Adrien Destugues <pulkomandy@gmail.com> ActivityMonitor: don't draw graph with negative width.

The computation of the graph width could overflow leading to an absurdly
high count of lines to be drawn. This would freeze with BShape trying to
realloc the array to bigger and bigger sizes as lines were added to it
(by increment of 256, but still), or trigerred a bad_alloc in
BeginLineArray which allocates them upfront after I converted the code
to use that (it is more appropriate).

Add sanity checks to avoid the overflow, now you can have hundreds of
graphs without problems (much more than I can fit on my screen anyway,
which I think is good enough).

Fixes #6841.