Commit b64231c8 authored by Scott Vokes's avatar Scott Vokes
Browse files

During copy of config to heap, update hmacKey data pointer to heap copy.

Otherwise, it will contain a stale pointer to the call stack.
parent 9b76bc2b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ KineticSession* KineticAllocator_NewSession(struct bus * b, KineticSessionConfig

    // Copy the supplied config into the session config
    session->config = *config;
    // Update pointer to copy of key data
    session->config.hmacKey.data = session->config.keyData;
    strncpy(session->config.host, config->host, sizeof(session->config.host));

    return session;