Skip to content

Commit

Permalink
record error in BUF_CHK
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Apr 4, 2022
1 parent c2b52b3 commit 1d01cae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ext/yajl/yajl_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ yajl_render_error_string(yajl_handle hand, const unsigned char * jsonText,
}

/* check for buffer error */
#define _BUF_CHK(x) \
if (yajl_buf_err(x)) { \
return yajl_status_alloc_failed; \
#define _BUF_CHK(x) \
if (yajl_buf_err(x)) { \
yajl_bs_set(hand->stateStack, yajl_state_parse_error); \
hand->parseError = \
"allocation failed"; \
return yajl_status_alloc_failed; \
}

yajl_status
Expand Down

0 comments on commit 1d01cae

Please sign in to comment.