]> granicus.if.org Git - esp-idf/commitdiff
example/openssl_client: Fix http string "printf" error without end character '\0'
authorDong Heng <dongheng>
Mon, 4 Sep 2017 05:29:19 +0000 (13:29 +0800)
committerDong Heng <dongheng>
Mon, 4 Sep 2017 05:29:19 +0000 (13:29 +0800)
examples/protocols/openssl_client/main/openssl_client_example_main.c

index cb114ddf868c5533f86a36fe73829a28cbebd361..cf9d14d41c8f2cbb5df7f66260951840ef8d9210 100644 (file)
@@ -137,6 +137,7 @@ static void openssl_example_task(void *p)
         if (ret <= 0) {
             break;
         }
+        recv_buf[ret] = '\0';
         recv_bytes += ret;
         ESP_LOGI(TAG, "%s", recv_buf);
     } while (1);