|
|
Subscribe / Log in / New account

Safer flexible arrays for the kernel

Safer flexible arrays for the kernel

Posted Sep 30, 2022 2:25 UTC (Fri) by mirabilos (subscriber, #84359)
Parent article: Safer flexible arrays for the kernel

You *never* use sizeof on a struct with a flexible array member. You use offsetof of that member plus the size of the extra area to allocate.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds