encrypt: add socket null check
authorSooyoung Ha <yoosah.ha@samsung.com>
Mon, 4 Sep 2017 06:01:08 +0000 (15:01 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Mon, 4 Sep 2017 06:01:08 +0000 (15:01 +0900)
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
src/transport.c

index 191126765dc846b323f9f8db586445919eebbe38..202f67f1efb4b9a21874fc370ccec8fe8b510052 100755 (executable)
@@ -995,7 +995,7 @@ void wakeup_select_func(int _fd, unsigned ev, void *data) {
         }
     }
 #ifdef SUPPORT_ENCRYPT
-    else if(cmd == A_ENCR){ // 암호화 handshaking메시지인 경우
+    else if(cmd == A_ENCR && sock != NULL){ // 암호화 handshaking메시지인 경우
         PACKET* enc_p = get_apacket();
         if(p->msg.arg0 == ENCR_SET_ON_REQ){ // hello 메시지인 경우
             if(security_parse_client_hello(t->sessionID, p->data, &(p->msg.data_length)) == 1) // hello 메시지 파싱