From 282914669483405a34000ed24b541201f8d29c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Wed, 10 Nov 2021 01:31:46 +0300 Subject: hashmap_remove: fix potential use-after-free prev should be assigned before node is reassigned. --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 79fd0e6..12944fe 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ -CFLAGS= -g -Wall -std=c99 -I. +CFLAGS= -O0 -g -Wall -std=c99 -I. LDLIBS= TESTFLAGS= $(CFLAGS) -Isrc/ ifdef debug CFLAGS+=-DDEBUG endif +ifdef ASAN +CFLAGS+= -fsanitize=address +endif all: check bin:; mkdir -p bin/ @@ -19,4 +22,4 @@ check: bin/test_hashmap bin/test_template for test in $^; do $$test || exit 1; done .PHONY: clean -clean:; rm -r bin/ \ No newline at end of file +clean:; rm -r bin/ -- cgit v1.2.3