Skip to content

Commit 22ebd78

Browse files
authored
fix malloc (#458)
1 parent 423d7ea commit 22ebd78

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Authentication.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ char *TokenSupplier(void *ctx) {
7777

7878
future.wait();
7979

80-
char *token = (char *)malloc(dataPtr->token.size());
80+
char *token = (char *)malloc(dataPtr->token.size() + 1);
8181
strcpy(token, dataPtr->token.c_str());
8282
return token;
8383
}

0 commit comments

Comments
 (0)