From: Sashi Penta Date: Sat, 20 Dec 2014 07:48:07 +0000 (-0800) Subject: [CA-Integration]: Temporary fix for stack smashing and fix support for "/" X-Git-Tag: 1.2.0+RC1~1855^2~319 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efe5997bf4b92556803da4b50ebcd44a395432ca;p=platform%2Fupstream%2Fiotivity.git [CA-Integration]: Temporary fix for stack smashing and fix support for "/" Change-Id: I54b9e4f8b51981094c8d78145510d3e865413f58 Signed-off-by: Sashi Penta --- diff --git a/resource/csdk/connectivity/build/linux/Makefile b/resource/csdk/connectivity/build/linux/Makefile index edf85e2..5158ebb 100644 --- a/resource/csdk/connectivity/build/linux/Makefile +++ b/resource/csdk/connectivity/build/linux/Makefile @@ -81,8 +81,8 @@ libtiny_lib_dir = $(PROJECT_LIB_PATH)/extlibs/tinydtls LDFLAGS := -L$(libcoap_build_dir) -L$(libtiny_lib_dir) LDLIBS := -lcoap -ltinydtls else -LDFLAGS := -L$(libcoap_build_dir) -LDLIBS := -lcoap +LDFLAGS := -L$(libcoap_build_dir) +LDLIBS := -lcoap endif BUILD_FLAG.debug = $(DEFINE_FLAG) $(DEBUG_FLAG) @@ -110,7 +110,8 @@ COMPONENT_OBJS = $(COMPONENT_SRCS:%.c=$(OBJ_DIR)/%.o) ## ## compiler flags ## -CFLAGS = -g -c -Wall -fPIC `pkg-config --cflags glib-2.0` +#TODO-CA Remove -fstack-protector-all before merging to master +CFLAGS = -g -c -Wall -fstack-protector-all -fPIC `pkg-config --cflags glib-2.0` LFLAGS = -ldl -lpthread `pkg-config --libs glib-2.0` IFLAGS = -I$(PROJECT_COMMON_INC_PATH) \ -I$(PROJECT_API_PATH) \ @@ -119,7 +120,7 @@ IFLAGS = -I$(PROJECT_COMMON_INC_PATH) \ -I$(WIFI_ADAPTER_PATH) \ -I$(BT_ADAPTER_PATH) \ -I$(BLE_ADAPTER_PATH) \ - -I$(libcoap_build_dir) + -I$(libcoap_build_dir) ifeq ($(DTLS),1) IFLAGS += -I$(libtiny_lib_dir) diff --git a/resource/csdk/connectivity/src/caremotehandler.c b/resource/csdk/connectivity/src/caremotehandler.c index d888034..011b170 100644 --- a/resource/csdk/connectivity/src/caremotehandler.c +++ b/resource/csdk/connectivity/src/caremotehandler.c @@ -391,7 +391,7 @@ CAResponseInfo_t *CACloneResponseInfo(const CAResponseInfo_t *rep) clone->info.token = temp; } - if (rep->info.options != NULL) + if (rep->info.options != NULL && rep->info.numOptions) { // save the options clone->info.options = (CAHeaderOption_t *) OICMalloc(sizeof(CAHeaderOption_t)); diff --git a/resource/csdk/stack/src/ocresource.c b/resource/csdk/stack/src/ocresource.c index 95c1f56..ec7c179 100644 --- a/resource/csdk/stack/src/ocresource.c +++ b/resource/csdk/stack/src/ocresource.c @@ -41,22 +41,12 @@ extern OCResource *headResource; static const char * VIRTUAL_RSRCS[] = { -// TODO-CA We will use the regular path once CA fixes this issue -#ifdef CA_INT - "oc/core", - "oc/core/d", - "oc/core/types/d", - #ifdef WITH_PRESENCE - "oc/presence" - #endif -#else "/oc/core", "/oc/core/d", "/oc/core/types/d", #ifdef WITH_PRESENCE "/oc/presence" #endif -#endif }; //-----------------------------------------------------------------------------