commit | cd9e1eabeb4137182200035ab6fa4522f8d24044 | [log] [download] |
---|---|---|
author | schwarze@openbsd.org <schwarze@openbsd.org> | Mon May 30 12:57:21 2016 +0000 |
committer | Darren Tucker <dtucker@zip.com.au> | Mon Jun 06 11:27:38 2016 +1000 |
tree | a4428fb623a0698643942b14222740abd5e8f423 | |
parent | ac284a355f8065eaef2a16f446f3c44cdd17371d [diff] |
upstream commit Even when only writing an unescaped character, the dst buffer may need to grow, or it would be overrun; issue found by tb@ with malloc.conf(5) 'C'. While here, reserve an additional byte for the terminating NUL up front such that we don't have to realloc() later just for that. OK tb@ Upstream-ID: 30ebcc0c097c4571b16f0a78b44969f170db0cff