summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-06-17 12:34:32 +0300
committerJakub Kicinski <kuba@kernel.org>2024-06-18 13:26:44 -0700
commit81d23d2a24012e448f651e007fac2cfd20a45ce0 (patch)
tree025f2646e1d0785f4be33cce130db5f4ba08378d /tools/testing
parent88c67aeb14070bab61d3dd8be96c8b42ebcaf53a (diff)
ptp: fix integer overflow in max_vclocks_store
On 32bit systems, the "4 * max" multiply can overflow. Use kcalloc() to do the allocation to prevent this. Fixes: 44c494c8e30e ("ptp: track available ptp vclocks information") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Heng Qi <hengqi@linux.alibaba.com> Link: https://lore.kernel.org/r/ee8110ed-6619-4bd7-9024-28c1f2ac24f4@moroto.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions