From 7138c819c484e71e2a21344bc3f91c66ca7b610a Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 8 Aug 2018 22:45:30 +0000 Subject: [PATCH] Terminate filter_create_ext() args with NULL, not 0. filter_create_ext() is documented to take a NULL terminated set of arguments. 0 is promoted to an int so this would fail on 64-bit systems if the value was not passed in a register. On all currently supported 64-bit architectures it is. Obtained from: CheriBSD Sponsored by: DARPA, AFRL --- contrib/flex/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/flex/main.c b/contrib/flex/main.c index 173e4d6cdf9..728e42b1245 100644 --- a/contrib/flex/main.c +++ b/contrib/flex/main.c @@ -364,7 +364,7 @@ void check_options () output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); if ( !(m4 = getenv("M4"))) m4 = M4; - filter_create_ext(output_chain, m4, "-gP", 0); + filter_create_ext(output_chain, m4, "-gP", NULL); filter_create_int(output_chain, filter_fix_linedirs, NULL); /* For debugging, only run the requested number of filters. */