diff options
author | Richard Yao <[email protected]> | 2023-03-11 13:39:24 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2023-03-14 15:25:55 -0700 |
commit | dbfc622345f95e09ce36cbecf70715b7adcad661 (patch) | |
tree | 01e20b462be771708504fbc2054a85034e4113c5 /etc | |
parent | d1807f168edd09ca26a5a0c6b570686b982808ad (diff) |
nvpair: Use flexible array member for nvpair name strings
Coverity reported possible out-of-bounds reads from doing `((char
*)(nvp) + sizeof (nvpair_t))` to get the nvpair name string. These were
initially marked as false positives, but since we are now using C99
flexible array members elsewhere, we could use them here too as cleanup
to make the code easier to understand.
Reviewed-by: Tino Reichardt <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Reported-by: Coverity (CID-977165)
Reported-by: Coverity (CID-1524109)
Reported-by: Coverity (CID-1524642)
Closes #14612
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions