summaryrefslogtreecommitdiff
path: root/lib/utils/libquad/include/sys
diff options
context:
space:
mode:
authorCarlos López <[email protected]>2024-08-01 14:48:11 +0200
committerAnup Patel <[email protected]>2024-08-02 08:53:20 +0530
commitcb0f4757fc2904cbf579e34feba891a5878625c5 (patch)
treed6c034ffb404dc898a8d9905b7af94029e658ae2 /lib/utils/libquad/include/sys
parentbaf6a75e3f967aa8b65a20963bd9ae21975ba75a (diff)
lib: sbi: fwft: fix incorrect size passed to sbi_zalloc()
The fwt_hart_state struct inciludes a flexible array member, so its allocation size will be that of the struct itself, plus that of each of the members in the array. When calculating this size, instead of taking the size of the struct, the size of a pointer to it was taken, which is incorrect. Luckily, this happenned to not produce memory corruption because the size of the non-flexible members of the struct is the same as the size of a pointer. Signed-off-by: Carlos López <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/libquad/include/sys')
0 files changed, 0 insertions, 0 deletions