diff --git a/src/Authentication.cc b/src/Authentication.cc index c340821..3b04554 100644 --- a/src/Authentication.cc +++ b/src/Authentication.cc @@ -77,7 +77,7 @@ char *TokenSupplier(void *ctx) { future.wait(); - char *token = (char *)malloc(dataPtr->token.size()); + char *token = (char *)malloc(dataPtr->token.size() + 1); strcpy(token, dataPtr->token.c_str()); return token; }