[CONPRO-1295] Fix build error dlog string
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / adapter_util / ca_adapter_net_ssl.c
index 7be3576..9b117cd 100644 (file)
@@ -660,7 +660,7 @@ static int SendCallBack(void * tep, const unsigned char * data, size_t dataLen)
         else if ((size_t)sentLen != dataLen)
         {
             OIC_LOG_V(DEBUG, NET_SSL_TAG,
-                    "Packet was partially sent - total/sent/remained bytes : %zd/%zu/%lu",
+                    "Packet was partially sent - total/sent/remained bytes : %zd/%zu/%zu",
                     sentLen, dataLen, (dataLen - sentLen));
         }
     }
@@ -1698,6 +1698,11 @@ static void SetupCipher(mbedtls_ssl_config * config, CATransportAdapter_t adapte
 
     memset(g_cipherSuitesList, 0, sizeof(g_cipherSuitesList));
 
+    if (SSL_CIPHER_MAX < g_caSslContext->cipher)
+    {
+        OIC_LOG(ERROR, NET_SSL_TAG, "Maximum ciphersuite index exceeded");
+    }
+
     // Add the preferred ciphersuite first
     if (SSL_CIPHER_MAX != g_caSslContext->cipher)
     {