From 35e063d82040a7c7a6da8634cf377e19ee0662d1 Mon Sep 17 00:00:00 2001 From: drl7x Date: Mon, 21 Oct 2002 21:28:59 +0000 Subject: [PATCH] Fixed bug which would cause splint to crash if it was started with the -i flags and given an invalid argument. This was confusing because -i is easily confuxed with -I. Bug reported by Jesse Laird. --- src/flags.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/flags.c b/src/flags.c index 0a8cea3..d197f6c 100644 --- a/src/flags.c +++ b/src/flags.c @@ -1784,7 +1784,11 @@ flags_processFlags (bool inCommandLine, { if (++i < argc) { - cstring arg = cstring_fromChars (argv[i]); + /*drl 10/21/2002 + Changed this because arg can be freed when it's passed to + lslinit_setInitFile and freeing argv[i] causes a seg fault + */ + cstring arg = cstring_fromCharsNew (argv[i]); if (opt == FLG_OPTF) { -- 2.45.2