diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-23 15:41:58 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-24 23:49:10 +0200 |
commit | caab22c0d468e90b6a95072f3092d5dcf331b3ef (patch) | |
tree | 158e761b2c5fea6fc651e8960c84fbb9fe307094 /tests/diff/binary.c | |
parent | aacfd03dba68333da726bb63e2594f3ed4a16422 (diff) | |
download | libgit2-caab22c0d468e90b6a95072f3092d5dcf331b3ef.tar.gz |
buffer: don't allow growing borrowed buffers
When we don't own a buffer (asize=0) we currently allow the usage of
grow to copy the memory into a buffer we do own. This muddles the
meaning of grow, and lets us be a bit cavalier with ownership semantics.
Don't allow this any more. Usage of grow should be restricted to buffers
which we know own their own memory. If unsure, we must not attempt to
modify it.
Diffstat (limited to 'tests/diff/binary.c')
0 files changed, 0 insertions, 0 deletions