diff options
| author | David Laight <david.laight.linux@gmail.com> | 2026-06-24 15:52:41 +0100 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-07-16 16:00:31 +0200 |
| commit | 78726ba0ffe3aa16848e86c4571ab647ff7b1b4e (patch) | |
| tree | 5c26f5511a7679b20c99911ae3dc87bdbac638ba /tools/perf/scripts/python/bin/export-to-postgresql-record | |
| parent | c92d632f8638df0c5b644739b1fd06e36a7630fb (diff) | |
dm: __list_versions(): Only process targets once
Instead of doing a prescan to determine the length of buffer required,
checking the supplied buffer is big enough, and then doing a second
scan to fill the output buffer just do a single scan and detect when
the buffer is too short.
This removes any problems that might occur if a 'target' is added
between the scans.
For additional safety only call strlen(tt->name) once and use the
returned length for everything (incuding the copy).
Ensure than all the pad bytes between the entries are zero.
Set param->data_size to the actual size of the data.
It was slightly large because ALIGN_MASK was added in instead of the size
being rounded up.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-record')
0 files changed, 0 insertions, 0 deletions
