From 49ec613201b2e9debdf9e9ad9a2ad7c6c8083729 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 12 Oct 2012 13:35:40 -0400 Subject: In our source code, make a copy of getopt's 'optarg' string arguments, rather than just storing a pointer. --- src/interfaces/ecpg/preproc/ecpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interfaces') diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 7e7bae30a0b..1b775a13e8f 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -171,7 +171,7 @@ main(int argc, char *const argv[]) regression_mode = true; break; case 'o': - output_filename = optarg; + output_filename = strdup(optarg); if (strcmp(output_filename, "-") == 0) yyout = stdout; else -- cgit v1.2.3