xrmx / bootchart

merge of bootchart-collector and pybootchartgui
GNU General Public License v2.0
233 stars 87 forks source link

Fix memory corruption due to insufficient PidMap growth #69

Closed mephi42 closed 8 years ago

xrmx commented 8 years ago

Same issue here? https://github.com/xrmx/bootchart/blob/eac17484522ff5a045c41592c4778c4db66a8746/collector/collector.c#L57 It would be nice to understand if 512 has some meaning. UPDATE: nope, the collector.c hunk is fine

mephi42 commented 8 years ago

Not really, since there value of pids_size = pid + 512 is derived from the requested index, rather than the current size.

I think the intention was to grow the dynamic array by some reasonable value (as opposed to the worst case of growing it by 1 each time).

xrmx commented 8 years ago

Merged, thanks!