Project

General

Profile

« Previous | Next » 

Revision 82fdffc5

Added by alanwu (Alan Wu) about 5 years ago

Avoid UB with flexible array member

Accessing past the end of an array is technically UB. Use C99 flexible
array member instead to avoid the UB and simplify allocation size
calculation.

See also: DCL38-C in the SEI CERT C Coding Standard