snprintf: move contributed ssl patch to lws_snprintf
authorAndy Green <andy@warmcat.com>
Wed, 3 May 2017 12:25:16 +0000 (20:25 +0800)
committerAndy Green <andy@warmcat.com>
Wed, 3 May 2017 12:25:16 +0000 (20:25 +0800)
lib/ssl.c

index 0279367f2193135629cf2d9a4c57b8a6341c5ba6..c8ebe88be358ce7b5a334de4fa5ac717571b2452 100644 (file)
--- a/lib/ssl.c
+++ b/lib/ssl.c
@@ -122,13 +122,13 @@ char* lws_ssl_get_error_string(int status, int ret, char *buf, size_t len) {
        case SSL_ERROR_SYSCALL:
                switch (ret) {
                 case 0:
-                        snprintf(buf, len, "SSL_ERROR_SYSCALL: EOF");
+                        lws_snprintf(buf, len, "SSL_ERROR_SYSCALL: EOF");
                         return buf;
                 case -1:
 #ifndef LWS_PLAT_OPTEE
-                       snprintf(buf, len, "SSL_ERROR_SYSCALL: %s", strerror(errno));
+                       lws_snprintf(buf, len, "SSL_ERROR_SYSCALL: %s", strerror(errno));
 #else
-                       snprintf(buf, len, "SSL_ERROR_SYSCALL: %d", errno);
+                       lws_snprintf(buf, len, "SSL_ERROR_SYSCALL: %d", errno);
 #endif
                        return buf;
                 default: