Skip to content

Commit

Permalink
Enforce strict mode of jsmn.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
stoeckmann committed Jul 12, 2019
1 parent 5c39084 commit baa6a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit baa6a55

Please sign in to comment.