index
:
ndpi-daemon.git
Tiny nDPI based deep packet inspection daemons / toolkit.
log msg
author
committer
range
add/PF_RING
add/apple-bsd-port
add/config-file-support
add/event-io-abstraction
add/nDPId-UDP-endpoint
add/tls-proxy-support
add/tunnel-decoding
add/udp-aes256-gcm
main
ndpi-example-proposal
tmp
about
summary
refs
log
tree
commit
diff
path:
root
/
jsmn.c
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
(limited to 'jsmn.c')
-rw-r--r--
jsmn.c
2
1 files changed, 2 insertions, 0 deletions
diff --git a/jsmn.c b/jsmn.c
index e38a47252..cc300e360 100644
--- a/
jsmn.c
+++ b/
jsmn.c
@@ -161,6 +161,8 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens,
break;
}
}
+ /* Error if unmatched closing bracket */
+ if (i == -1) return JSMN_ERROR_INVAL;
for (; i >= 0; i--) {
token = &tokens[i];
if (token->start != -1 && token->end == -1) {