Merge "Improve security by avoiding buffer overflows"
This commit is contained in:
commit
4a1f5fb034
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# BSD LICENSE
|
# BSD LICENSE
|
||||||
#
|
#
|
||||||
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
EXECS = guest_scale_helper guest_scale_agent
|
EXECS = guest_scale_helper guest_scale_agent
|
||||||
|
|
||||||
CFLAGS= -g -Wall
|
CFLAGS= -g -Wall -Wformat -Wformat-security
|
||||||
ODIR=obj
|
ODIR=obj
|
||||||
BINDIR=bin
|
BINDIR=bin
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ printvars:
|
||||||
|
|
||||||
.PHONY: printvars
|
.PHONY: printvars
|
||||||
|
|
||||||
all: host_all
|
all: host_all
|
||||||
host_all: $(BINEXECS) sdk/$(EXPORT_SDK).tgz
|
host_all: $(BINEXECS) sdk/$(EXPORT_SDK).tgz
|
||||||
|
|
||||||
# The dependency tracking for the SDK tarball is rather crude. If any
|
# The dependency tracking for the SDK tarball is rather crude. If any
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -66,6 +66,7 @@ program_BUILD_OBJS := $(addprefix $(BUILD_DIR)/, $(heartbeat_C_OBJS))
|
||||||
program_BUILD_OBJS += $(addprefix $(BUILD_DIR)/, $(program_C_OBJS))
|
program_BUILD_OBJS += $(addprefix $(BUILD_DIR)/, $(program_C_OBJS))
|
||||||
|
|
||||||
CFLAGS = -g -O2 -Wall -Werror -Wformat -DSYSCONFDIR=$(sysconfdir)
|
CFLAGS = -g -O2 -Wall -Werror -Wformat -DSYSCONFDIR=$(sysconfdir)
|
||||||
|
CFLAGS += -Wformat-security
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -54,7 +54,7 @@ heartbeat_C_INCLUDES += -I$(CURRENT_DIR)/../../../include
|
||||||
heartbeat_C_SRCS := $(wildcard *.c)
|
heartbeat_C_SRCS := $(wildcard *.c)
|
||||||
heartbeat_C_OBJS := ${heartbeat_C_SRCS:.c=.o}
|
heartbeat_C_OBJS := ${heartbeat_C_SRCS:.c=.o}
|
||||||
|
|
||||||
CFLAGS = -g -O2 -Wall -Werror -Wformat -DSYSCONFDIR=$(sysconfdir)
|
CFLAGS = -g -O2 -Wall -Werror -Wformat -DSYSCONFDIR=$(sysconfdir) -Wformat-security
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) $(heartbeat_C_INCLUDES) -c $< -o $(BUILD_DIR)/$@ -ljson-c
|
$(CC) $(CFLAGS) $(heartbeat_C_INCLUDES) -c $< -o $(BUILD_DIR)/$@ -ljson-c
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
# Copyright(c) 2013-2016, Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -72,7 +72,7 @@ sample_C_OBJS := ${sample_C_SRCS:.c=.o}
|
||||||
sample_LDLIBS := -L$(BUILD_DIR) -l$(common_NAME) -l$(heartbeat_NAME) -lrt
|
sample_LDLIBS := -L$(BUILD_DIR) -l$(common_NAME) -l$(heartbeat_NAME) -lrt
|
||||||
sample_BUILD_OBJS := $(addprefix $(BUILD_DIR)/, $(sample_C_OBJS))
|
sample_BUILD_OBJS := $(addprefix $(BUILD_DIR)/, $(sample_C_OBJS))
|
||||||
|
|
||||||
CFLAGS = -g -O2 -Wall -Werror -Wformat -fPIC -DSYSCONFDIR=$(sysconfdir)
|
CFLAGS = -g -O2 -Wall -Werror -Wformat -fPIC -DSYSCONFDIR=$(sysconfdir) -Wformat-security
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
EXECS= guest_agent server_group_app
|
EXECS= guest_agent server_group_app
|
||||||
|
|
||||||
CFLAGS= -g -Wall
|
CFLAGS= -g -Wall -Wformat -Wformat-security
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
ODIR=obj
|
ODIR=obj
|
||||||
BINDIR=bin
|
BINDIR=bin
|
||||||
|
@ -51,7 +51,7 @@ GUEST_CLIENT_APP_SRCS = server_group_app.c
|
||||||
GUEST_CLIENT_APP_OBJ := $(patsubst %,$(ODIR)/%,$(GUEST_CLIENT_APP_SRCS:.c=.o))
|
GUEST_CLIENT_APP_OBJ := $(patsubst %,$(ODIR)/%,$(GUEST_CLIENT_APP_SRCS:.c=.o))
|
||||||
|
|
||||||
LIBGUESTHOSTMSG_SRCS := lib_guest_host_msg.c
|
LIBGUESTHOSTMSG_SRCS := lib_guest_host_msg.c
|
||||||
LIBGUESTHOSTMSG_INCLUDES := guest_host_msg.h
|
LIBGUESTHOSTMSG_INCLUDES := guest_host_msg.h
|
||||||
LIBGUESTHOSTMSG_OBJ := $(patsubst %,$(ODIR)/%,$(LIBGUESTHOSTMSG_SRCS:.c=.o))
|
LIBGUESTHOSTMSG_OBJ := $(patsubst %,$(ODIR)/%,$(LIBGUESTHOSTMSG_SRCS:.c=.o))
|
||||||
LIBGUESTHOSTMSG := guesthostmsg
|
LIBGUESTHOSTMSG := guesthostmsg
|
||||||
LIBGUESTHOSTMSG_SO := $(patsubst %,lib%.so,$(LIBGUESTHOSTMSG))
|
LIBGUESTHOSTMSG_SO := $(patsubst %,lib%.so,$(LIBGUESTHOSTMSG))
|
||||||
|
|
Loading…
Reference in New Issue