From 43d0f3fc76542d0859c9b84402c0483a22e02b68 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 7 Jan 2008 12:29:30 +0000 Subject: rc_getline keeps expanding it's malloced buffer until it has read a whole line or EOF. All functions which read into static buffers have been changed to use fhis function to avoid any potential overflows and to ensure we really do read a long long config line. --- src/cc.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cc.mk') diff --git a/src/cc.mk b/src/cc.mk index d3c96a65..1dc1b3fe 100644 --- a/src/cc.mk +++ b/src/cc.mk @@ -6,7 +6,7 @@ CFLAGS ?= -O2 -pipe # GNU Make way of detecting gcc flags we can use check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ - then echo "$(1)"; else echo "$(2)"; fi) + then echo "$(1)"; else echo "$(2)"; fi) # pmake check for extra cflags WEXTRA != for x in -Wdeclaration-after-statement -Wsequence-point -Wextra; do \ @@ -16,10 +16,10 @@ WEXTRA != for x in -Wdeclaration-after-statement -Wsequence-point -Wextra; do \ # Loads of nice flags to ensure our code is good CFLAGS += -pedantic -std=c99 \ - -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 \ - -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings \ - -Wbad-function-cast -Wnested-externs -Wcomment -Winline \ - -Wchar-subscripts -Wcast-align -Wno-format-nonliteral \ - $(call check_gcc, -Wdeclaration-after-statement) \ - $(call check_gcc, -Wsequence-point) \ - $(call check_gcc, -Wextra) $(WEXTRA) + -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 \ + -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings \ + -Wbad-function-cast -Wnested-externs -Wcomment -Winline \ + -Wchar-subscripts -Wcast-align -Wno-format-nonliteral \ + $(call check_gcc, -Wdeclaration-after-statement) \ + $(call check_gcc, -Wsequence-point) \ + $(call check_gcc, -Wextra) $(WEXTRA) -- cgit v1.2.3