42 строки
1.9 KiB
Diff
42 строки
1.9 KiB
Diff
Nicolas Guibourge, Tue Aug 23 2022, backport from version 1.4.1 to 1.3.1
|
|
From commitid 8daacc158c209ae881db76a762e3f105a22741b9
|
|
From commitid 22aa1e7b8f613263c781f9c44468b997e91ac583
|
|
|
|
diff -ru yajl-ruby-1.3.1-orig/ext/yajl/api/yajl_gen.h yajl-ruby-1.3.1/ext/yajl/api/yajl_gen.h
|
|
--- yajl-ruby-1.3.1-orig/ext/yajl/api/yajl_gen.h 2017-11-06 22:19:23.000000000 -0800
|
|
+++ yajl-ruby-1.3.1/ext/yajl/api/yajl_gen.h 2022-08-23 02:58:32.587721599 -0700
|
|
@@ -63,7 +63,9 @@
|
|
yajl_gen_invalid_number,
|
|
/** A print callback was passed in, so there is no internal
|
|
* buffer to get from */
|
|
- yajl_gen_no_buf
|
|
+ yajl_gen_no_buf,
|
|
+ /** Tried to decrement at depth 0 */
|
|
+ yajl_depth_underflow
|
|
} yajl_gen_status;
|
|
|
|
/** an opaque handle to a generator */
|
|
diff -ru yajl-ruby-1.3.1-orig/ext/yajl/yajl_gen.c yajl-ruby-1.3.1/ext/yajl/yajl_gen.c
|
|
--- yajl-ruby-1.3.1-orig/ext/yajl/yajl_gen.c 2017-11-06 22:19:23.000000000 -0800
|
|
+++ yajl-ruby-1.3.1/ext/yajl/yajl_gen.c 2022-08-23 03:00:27.108553941 -0700
|
|
@@ -178,7 +178,7 @@
|
|
if (++(g->depth) >= YAJL_MAX_DEPTH) return yajl_max_depth_exceeded;
|
|
|
|
#define DECREMENT_DEPTH \
|
|
- if (--(g->depth) >= YAJL_MAX_DEPTH) return yajl_gen_error;
|
|
+ if (--(g->depth) >= YAJL_MAX_DEPTH) return yajl_depth_underflow;
|
|
|
|
#define APPENDED_ATOM \
|
|
switch (g->state[g->depth]) { \
|
|
diff -ru yajl-ruby-1.3.1-orig/ext/yajl/yajl_lex.c yajl-ruby-1.3.1/ext/yajl/yajl_lex.c
|
|
--- yajl-ruby-1.3.1-orig/ext/yajl/yajl_lex.c 2017-11-06 22:19:23.000000000 -0800
|
|
+++ yajl-ruby-1.3.1/ext/yajl/yajl_lex.c 2022-08-23 03:01:34.613044611 -0700
|
|
@@ -46,6 +46,7 @@
|
|
case yajl_tok_bool: return "bool";
|
|
case yajl_tok_colon: return "colon";
|
|
case yajl_tok_comma: return "comma";
|
|
+ case yajl_tok_comment: return "comment";
|
|
case yajl_tok_eof: return "eof";
|
|
case yajl_tok_error: return "error";
|
|
case yajl_tok_left_brace: return "brace";
|