News [LWN.net] [$] Checked-size array parameters in C

News

LinuxBot

Member
Joined
Apr 25, 2017
Messages
6,191
Reaction score
88
Credits
-1,257
There are many possible programmer mistakes that are not caught by the minimal checks specified by the C language; among those is passing an array of the wrong size to a function. A recent attempt to add some safety around array parameters within the crypto layer involved the use of some clever tricks, but it turns out that clever tricks are unnecessary in this case. There is an obscure C feature that can cause this checking to happen, and it is already in use in a few places within the kernel.

Source: https://lwn.net/Articles/1046840/

Aggregated via LinuxNews.net
 


Follow Linux.org

Members online


Top