diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-22 06:12:39 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-22 06:12:39 -0700 |
commit | e665ad5f93d3bd2f9a4537da80d50b2b2f8e4c5d (patch) | |
tree | daf11992de3e6b21caefdb20ab7ebec8b6270064 /filter.c | |
parent | a9a7efc1790c6ebe663107fbf10c8b72cd76b91b (diff) | |
download | txr-e665ad5f93d3bd2f9a4537da80d50b2b2f8e4c5d.tar.gz txr-e665ad5f93d3bd2f9a4537da80d50b2b2f8e4c5d.tar.bz2 txr-e665ad5f93d3bd2f9a4537da80d50b2b2f8e4c5d.zip |
buffers: fix infinite loop in buf_grow.
* buf.c (buf_grow): When size is zero and len is nonzero, the
loop doesn't terminate. Replace silly loop with
straightforward calculation: grow buffer by 25%, capped at
INT_PTR_MAX, or grow to the length, whichever is larger.
Diffstat (limited to 'filter.c')
0 files changed, 0 insertions, 0 deletions