From b7b449cec355b1635db34996b2f3a0fb39d8231f Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 17 Mar 2016 20:52:15 +0100 Subject: [PATCH 1/2] Install directory now defaults to INSDIR, for ease of use during development. --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e203d3243..5a92bb593 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,12 @@ DEFAULT_PLATFORM = pc86 ACK_TEMP_DIR = /tmp -# Where is the ACK going to be installed, eventually? +# Where is the ACK going to be installed, eventually? If you don't want to +# install it and just want to run the ACK from the build directory +# (/tmp/ack-build/staging, by default), leave this as $(INSDIR). -PREFIX = /usr/local +#PREFIX = /usr/local +PREFIX = $(INSDIR) # Where do you want to put the object files used when building? From 863b61014470ca9397a1904472e8fc1e6791023e Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 17 Mar 2016 20:52:27 +0100 Subject: [PATCH 2/2] Fix use-after-free. --- lang/cem/cemcom.ansi/input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lang/cem/cemcom.ansi/input.c b/lang/cem/cemcom.ansi/input.c index fc1e99f28..2b652b64f 100644 --- a/lang/cem/cemcom.ansi/input.c +++ b/lang/cem/cemcom.ansi/input.c @@ -82,10 +82,9 @@ AtEoIF() } IncludeLevel--; #endif - if (WorkingDir[0] != '\0') free(WorkingDir); + /* We don't free WorkingDir and FileName here because the rest of the + * compiler may be holding pointers to them for displaying error messages. + */ #endif /* NOPP */ -#ifndef LINT - if (FileName != source) free(FileName); -#endif return 0; }