summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2023-02-28 19:28:27 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-03-07 19:13:38 +0300
commit14e05beb10326eeb997ec5ebbf10edf08e85c3f8 (patch)
tree8f9413e78a07a43d59940c90ffd4bc6356eec0ee /tools/perf/scripts/python/export-to-postgresql.py
parent6933486133ecf71bbe273d7ac72cfc4a51286af3 (diff)
downloadlinux-14e05beb10326eeb997ec5ebbf10edf08e85c3f8.tar.xz
wifi: nl80211: convert cfg80211_scan_request allocation to *_size macros
The cfg80211_scan_request structure is followed by a flexible array member as well as several other arrays that are then stored into pointers in the structure. These are allocated currently using a simple sequence of multiplications. Replace the calculations with struct_size(), size_add(), and array_size() helper macros. These macros saturate the calculation at SIZE_MAX rather than overflowing. Note that we can't use flex_array_size() instead of array_size() because the fields are not arrays, but simple pointers. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230228162827.3876606-3-jacob.e.keller@intel.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions