develop.uap-core.de/git
/
uwplayer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6f0f043
)
fix json_reader_literal
author
Olaf Wintermann
<olaf.wintermann@gmail.com>
Wed, 12 Jan 2022 18:16:57 +0000
(19:16 +0100)
committer
Olaf Wintermann
<olaf.wintermann@gmail.com>
Wed, 12 Jan 2022 18:16:57 +0000
(19:16 +0100)
application/json.c
patch
|
blob
|
history
diff --git
a/application/json.c
b/application/json.c
index
719a570
..
5a5446e
100644
(file)
--- a/
application/json.c
+++ b/
application/json.c
@@
-614,9
+614,10
@@
int json_reader_isnull(JSONParser *p) {
JSONLiteralType json_reader_literal(JSONParser *p) {
const char *l = p->reader_token.content;
- if(!strcmp(l, "true")) {
+ size_t token_len = p->reader_token.length;
+ if(token_len == 4 && !memcpy(l, "true", 5)) {
return JSON_TRUE;
- } else if(
!strcmp(l, "false"
)) {
+ } else if(
token_len == 5 && !memcpy(l, "false", 5
)) {
return JSON_FALSE;
}
return JSON_NULL;