Commit bb53715d authored by Kishen Maloor's avatar Kishen Maloor

oc_server_api: fix NULL ptr deref

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent e6d91682
Pipeline #1017 passed with stage
in 12 minutes and 30 seconds
......@@ -74,7 +74,7 @@ void
oc_send_response(oc_request_t *request, oc_status_t response_code)
{
#ifdef OC_SPEC_VER_OIC
if (request->origin->version == OIC_VER_1_1_0) {
if (request->origin && request->origin->version == OIC_VER_1_1_0) {
request->response->content_format = APPLICATION_CBOR;
} else
#endif /* OC_SPEC_VER_OIC */
......
......@@ -11,7 +11,7 @@ extern "C" {
typedef uint64_t oc_clock_time_t;
#define OC_CLOCK_CONF_TICKS_PER_SECOND CLOCKS_PER_SEC
#define OC_SPEC_VER_OIC
//#define OC_SPEC_VER_OIC
/* Security Layer */
/* Max inactivity timeout before tearing down DTLS connection */
#define OC_DTLS_INACTIVITY_TIMEOUT (600)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment