Commit 357161ac authored by Jay Satiro's avatar Jay Satiro
Browse files

openssl: fix gcc8 warning

- Use memcpy instead of strncpy to copy a string without termination,
  since gcc8 warns about using strncpy to copy as many bytes from a
  string as its length.

Suggested-by: Viktor Szakats

Closes https://github.com/curl/curl/issues/2980
parent 11e8a43f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ static void ossl_keylog_callback(const SSL *ssl, const char *line)
      if(!buf)
        return;
    }
    strncpy(buf, line, linelen);
    memcpy(buf, line, linelen);
    buf[linelen] = '\n';
    buf[linelen + 1] = '\0';