diary

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

commit 6869382be1a41df5b9cc2ba55fcbad4384c82d02
parent 41831cc3c6866580bee0cc9a6037331aa71691f5
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 26 Mar 2023 21:43:31 +0200

fix(caldav): increase token size

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

diff --git a/src/caldav.c b/src/caldav.c @@ -1,8 +1,8 @@ #include "caldav.h" CURL *curl; -char access_token[210] = ""; -char refresh_token[210] = ""; +char access_token[250] = ""; +char refresh_token[250] = ""; int token_ttl = 0; // Local bind address for receiving OAuth callbacks. @@ -110,7 +110,7 @@ void update_global_token_vars(char* input) { char* new_access_token = extract_json_value(input, "access_token", true); tracepoint(diary, debug_string, "New access token", new_access_token); if (new_access_token != NULL) { - strncpy(access_token, new_access_token, 210); + strncpy(access_token, new_access_token, 250); free(new_access_token); } @@ -129,7 +129,7 @@ void update_global_token_vars(char* input) { char* new_refresh_token = extract_json_value(input, "refresh_token", true); tracepoint(diary, debug_string, "New refresh token", new_refresh_token); if (new_refresh_token != NULL) { - strncpy(refresh_token, new_refresh_token, 210); + strncpy(refresh_token, new_refresh_token, 250); free(new_refresh_token); } }