Closed RSilicon closed 1 year ago
@millert Thoughts on this?
My concern is that there are probably still people building sudo with a pre-C99 compiler which may not support C99 flexible array members.
My concern is that there are probably still people building sudo with a pre-C99 compiler which may not support C99 flexible array members.
I thought C99 was a prerequisite for building this program...
Sudo can still be built with a C89 compiler, though some of the the debug functionality will be omitted if the preprocessor is missing varargs support (either gcc or C99 style). I reached out to someone I know who builds sudo for older platforms and it doesn't look like this change will cause problems.
Variable length arrays are supported by C99, but having it denoted as "1" confused the compiler and is not defined.
Note that because we don't get the inferred NULL terminator, we have to increase the malloc size by one.