diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 99111d57263de2f3d79b307da5bd0c52e3893e9d
parent 7448eb51d32bd5e7c3752ece401b96babffea316
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Wed,  3 May 2023 20:20:22 +0200

fix: token size

Increase token size to max. advertised in the Google API docs:
https://developers.google.com/identity/protocols/oauth2#size

Diffstat:
Msrc/caldav.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/caldav.c b/src/caldav.c @@ -1,8 +1,8 @@ #include "caldav.h" CURL *curl; -char access_token[250] = ""; -char refresh_token[250] = ""; +char access_token[sizeof(char)*2048] = ""; +char refresh_token[sizeof(char)*512] = ""; int token_ttl = 0; // Local bind address for receiving OAuth callbacks. @@ -142,7 +142,7 @@ void update_tokenfile_from_global_vars() { if (tokenfile == NULL) { perror("Warning - failed to open tokenfile in update_tokenfile_from_global_vars()"); } else { - char contents[1000]; + char contents[sizeof(char)*2048 + sizeof(char)*512 + 200]; char* tokenfile_contents = "{\n" " \"access_token\": \"%s\",\n" " \"expires_in\": %i,\n"