Skip to content

Commit

Permalink
Fix the memory leaks in internal JSON parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Apr 4, 2021
1 parent bbbb175 commit 29778d7
Show file tree
Hide file tree
Showing 8 changed files with 1,477 additions and 1,527 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Google OAuth2.0 Access Token generation Arduino Library v1.0.2
# Google OAuth2.0 Access Token generation Arduino Library v1.0.3


This is the library will create the OAuth2.0 access token used in the Google API's http request (REST).
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP Signer",
"version": "1.0.2",
"version": "1.0.3",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "The Google OAuth2.0 access token generation for Google REST API's http request.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=ESP Signer

version=1.0.2
version=1.0.3

author=Mobizt

Expand Down
6 changes: 3 additions & 3 deletions src/ESPSigner.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Google's OAuth2.0 Access token Generation class, Signer.h version 1.0.2
* Google's OAuth2.0 Access token Generation class, Signer.h version 1.0.3
*
* This library use RS256 for signing algorithm.
*
* The signed JWT token will be generated and exchanged with the access token in the final generating process.
*
* This library supports Espressif ESP8266 and ESP32
*
* Created March 25, 2021
* Created April 4, 2021
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2021 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -546,7 +546,7 @@ bool ESP_Signer::handleTokenResponse()
int chunkedDataState = 0;
int chunkedDataSize = 0;
int chunkedDataLen = 0;
int defaultChunkSize = 2048;
int defaultChunkSize = ESP_SIGNER_DEFAULT_RESPONSE_BUFFER_SIZE;
char *header = nullptr;
char *payload = nullptr;
char *pChunk = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/ESPSigner.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Google's OAuth2.0 Access token Generation class, Signer.h version 1.0.2
* Google's OAuth2.0 Access token Generation class, Signer.h version 1.0.3
*
* This library use RS256 for signing algorithm.
*
* The signed JWT token will be generated and exchanged with the access token in the final generating process.
*
* This library supports Espressif ESP8266 and ESP32
*
* Created March 25, 2021
* Created April 4, 2021
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2021 K. Suwatchai (Mobizt)
Expand Down
3 changes: 2 additions & 1 deletion src/SignerCommon.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
* Created March 22, 2021
* Created April 4, 2021
*
* Copyright (c) 2021 K. Suwatchai (Mobizt)
*
Expand Down Expand Up @@ -55,6 +55,7 @@
#define WIFI_RECONNECT_TIMEOUT 10000
#define MAX_EXCHANGE_TOKEN_ATTEMPTS 5
#define ESP_DEFAULT_TS 1510644967
#define ESP_SIGNER_DEFAULT_RESPONSE_BUFFER_SIZE 2560

enum esp_signer_mem_storage_type
{
Expand Down
Loading

0 comments on commit 29778d7

Please sign in to comment.