core: stream: fix buffer overflow in stream indentation stack
This commit is contained in:
@@ -256,7 +256,7 @@ enum b_status b_stream_push_indent(b_stream *stream, int indent)
|
||||
stream->s_istack_ptr = 0;
|
||||
}
|
||||
|
||||
if (stream->s_istack_ptr + 1 > stream->s_istack_size) {
|
||||
if (stream->s_istack_ptr + 1 >= stream->s_istack_size) {
|
||||
int *buf = realloc(
|
||||
stream->s_istack,
|
||||
(stream->s_istack_size + 4) * sizeof(int));
|
||||
|
||||
Reference in New Issue
Block a user