diff --git a/Makefile b/Makefile index 0f58f03..3b668c7 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ INSTALL_EXEC= $(INSTALL) -m 0755 INSTALL_DATA= $(INSTALL) -m 0644 # C compilation flags -CFLAGS = -DPT_DEBUG -O2 -std=c99 -pedantic -Wall -Wextra +CFLAGS = -DPT_DEBUG -O2 -std=c99 -pedantic -Wall -Wextra -Wformat-security CPPFLAGS = -I$(LUA_INCDIR) LIBFLAG = -fPIC -shared diff --git a/pt-run.c b/pt-run.c index 64edf87..2cbb1ff 100644 --- a/pt-run.c +++ b/pt-run.c @@ -149,7 +149,7 @@ static void pt_run_dbg_print(const char *buf, bool *ellipsis, int *pframes, int || ((nframes - *pframes) <= PT_RUN_TRACEBACK_BOTTOM_THRESHOLD); if(luai_likely(should_print)) - fprintf(stderr, buf); + fprintf(stderr, "%s", buf); else if(*ellipsis) { fprintf(stderr, "\n ... (Skipped %d frames) ...\n\n", nframes - (PT_RUN_TRACEBACK_TOP_THRESHOLD