diff options
author | Gustavo A. R. Silva <[email protected]> | 2020-12-15 20:43:07 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-12-15 22:46:16 -0800 |
commit | 47e684aaa2661b2af39474a12d05447865ce9184 (patch) | |
tree | 6bfcd0f9ad5e26bd8428027416a7742d41263947 /lib/test_overflow.c | |
parent | 3a2b67e6e3fdb14c6da4c6909454d7a1d9b24f70 (diff) |
lib/stackdepot.c: use flex_array_size() helper in memcpy()
Make use of the flex_array_size() helper to calculate the size of a
flexible array member within an enclosing structure.
This helper offers defense-in-depth against potential integer overflows,
while at the same time makes it explicitly clear that we are dealing with
a flexible array member.
Link: https://lkml.kernel.org/r/186e37fe07196ee41a0e562fa8a8cb7a01112ec5.1601565471.git.gustavoars@kernel.org
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions