diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-03-02 22:51:38 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-03-03 17:30:40 +0000 |
commit | 763b6d325194a949a51bed7636caeaa7112b5ba3 (patch) | |
tree | bd539bdc69494629240e76827770a1d580918d20 /wsutil/jsmn.c | |
parent | d2720ecca7e715e087a001a0d73366a87f2cad82 (diff) | |
download | wireshark-763b6d325194a949a51bed7636caeaa7112b5ba3.tar.gz |
Added JSMN_STRICT that allow a more precise json parsing.
Bug: 10977
Change-Id: I725c10d895fdec4530d0761db3ac2659171f2f03
Reviewed-on: https://code.wireshark.org/review/7249
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'wsutil/jsmn.c')
-rw-r--r-- | wsutil/jsmn.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wsutil/jsmn.c b/wsutil/jsmn.c index 834e4b1ee9..fdfd3a74cc 100644 --- a/wsutil/jsmn.c +++ b/wsutil/jsmn.c @@ -22,6 +22,10 @@ #include <stdlib.h> +/* WS modification starts here */ +#define JSMN_STRICT +/* WS modification ends here */ + #include "jsmn.h" #include "log.h" @@ -333,6 +337,7 @@ void jsmn_init(jsmn_parser *parser) { parser->toksuper = -1; } +/* WS modification starts here */ gboolean jsmn_is_json(const guint8* buf, const size_t len) { /* We expect no more than 1024 tokens */ @@ -372,6 +377,7 @@ gboolean jsmn_is_json(const guint8* buf, const size_t len) return ret; } +/* WS modification ends here */ /* * Editor modelines - http://www.wireshark.org/tools/modelines.html |