From: Tobias Stoeckmann Date: Fri, 12 Jul 2019 18:40:39 +0000 (+0200) Subject: Enforce strict mode of jsmn. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=baa6a5584726b5feb7d6a59ba6d8949098b96bd4;p=bspwm.git Enforce strict mode of jsmn. If no strict mode of jsmn is enforced, then the correct amount of json elements would have to be checked to avoid segmentation faults on malformed state files: $ echo '{ "focusedMonitorId" }' > malformed-state $ bspwm -s malformed-state Segmentation fault $ _ Signed-off-by: Tobias Stoeckmann --- diff --git a/Makefile b/Makefile index 23aea6e..6983939 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERCMD ?= git describe 2> /dev/null VERSION := $(shell $(VERCMD) || cat VERSION) CPPFLAGS += -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" -CFLAGS += -std=c99 -pedantic -Wall -Wextra +CFLAGS += -std=c99 -pedantic -Wall -Wextra -DJSMN_STRICT LDFLAGS ?= LDLIBS = $(LDFLAGS) -lm -lxcb -lxcb-util -lxcb-keysyms -lxcb-icccm -lxcb-ewmh -lxcb-randr -lxcb-xinerama -lxcb-shape