Skip to content

Commit 572b063

Browse files
authored
fix MSVC compiler for parse_token (#146)
* fix MSVC compiler * PubNub SDK v4.0.5 release.
1 parent a502386 commit 572b063

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

.pubnub.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: c-core
22
schema: 1
3-
version: "4.0.4"
3+
version: "4.0.5"
44
scm: github.com/pubnub/c-core
55
changelog:
6+
- date: 2022-12-02
7+
version: v4.0.5
8+
changes:
9+
- type: bug
10+
text: "Fixed compilation error for MSVC in `pubnub_parse_token` function."
611
- date: 2022-11-25
712
version: v4.0.4
813
changes:
@@ -674,7 +679,7 @@ sdks:
674679
distribution-type: source code
675680
distribution-repository: GitHub release
676681
package-name: C-Core
677-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
682+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
678683
requires:
679684
-
680685
name: "miniz"
@@ -740,7 +745,7 @@ sdks:
740745
distribution-type: source code
741746
distribution-repository: GitHub release
742747
package-name: C-Core
743-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
748+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
744749
requires:
745750
-
746751
name: "miniz"
@@ -806,7 +811,7 @@ sdks:
806811
distribution-type: source code
807812
distribution-repository: GitHub release
808813
package-name: C-Core
809-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
814+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
810815
requires:
811816
-
812817
name: "miniz"
@@ -868,7 +873,7 @@ sdks:
868873
distribution-type: source code
869874
distribution-repository: GitHub release
870875
package-name: C-Core
871-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
876+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
872877
requires:
873878
-
874879
name: "miniz"
@@ -929,7 +934,7 @@ sdks:
929934
distribution-type: source code
930935
distribution-repository: GitHub release
931936
package-name: C-Core
932-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
937+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
933938
requires:
934939
-
935940
name: "miniz"
@@ -985,7 +990,7 @@ sdks:
985990
distribution-type: source code
986991
distribution-repository: GitHub release
987992
package-name: C-Core
988-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
993+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
989994
requires:
990995
-
991996
name: "miniz"
@@ -1038,7 +1043,7 @@ sdks:
10381043
distribution-type: source code
10391044
distribution-repository: GitHub release
10401045
package-name: C-Core
1041-
location: https://github.com/pubnub/c-core/releases/tag/v4.0.4
1046+
location: https://github.com/pubnub/c-core/releases/tag/v4.0.5
10421047
requires:
10431048
-
10441049
name: "miniz"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v4.0.5
2+
December 02 2022
3+
4+
#### Fixed
5+
- Fixed compilation error for MSVC in `pubnub_parse_token` function.
6+
17
## v4.0.4
28
November 25 2022
39

core/pubnub_grant_token_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static CborError data_recursion(CborValue* it, int nestingLevel, char** json_res
201201
encoded_sig.ptr[0] = '\0';
202202
}
203203

204-
char base64_str[encoded_sig.size + 2];
204+
char base64_str[67]; // HMAC+SHA256 max size + quotes + tailing null
205205
sprintf(base64_str, "\"%s\"", encoded_sig.ptr);
206206

207207
free(encoded_sig.ptr);

core/pubnub_version_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define INC_PUBNUB_VERSION_INTERNAL
44

55

6-
#define PUBNUB_SDK_VERSION "4.0.4"
6+
#define PUBNUB_SDK_VERSION "4.0.5"
77

88

99
#endif /* !defined INC_PUBNUB_VERSION_INTERNAL */

0 commit comments

Comments
 (0)