]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
darwinssl: fix incorrect usage of aprintf()
authorNick Zitzmann <nickzman@gmail.com>
Mon, 15 Dec 2014 06:56:09 +0000 (00:56 -0600)
committerNick Zitzmann <nickzman@gmail.com>
Mon, 15 Dec 2014 06:56:09 +0000 (00:56 -0600)
Commit b13923f changed an snprintf() to use aprintf(), but the API usage
wasn't correct, and was causing a crash to occur. This fixes it.

lib/vtls/curl_darwinssl.c

index b798acb892748eea53c61a6422cb951ca26ea0d9..2fb57b2e0eaecb3b9f9379bf980e496722501618 100644 (file)
@@ -1482,7 +1482,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn,
      to starting the handshake. */
   else {
     CURLcode retcode;
-    ssl_sessionid = aprintf(ssl_sessionid, "curl:%s:%hu",
+    ssl_sessionid = aprintf("curl:%s:%hu",
                             conn->host.name, conn->remote_port);
     ssl_sessionid_len = strlen(ssl_sessionid);
     err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len);