diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2015-05-30 00:02:51 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2015-06-07 12:19:06 +0200 |
commit | 14dc4a7781a74a156a418690467554bae4a79b97 (patch) | |
tree | 35e501fcdb1a59e543118613c5d9cfc090e285f7 /man/man1/cmark.1 | |
parent | 1551cf03d4589a87c381232cd7378c4dc459fe09 (diff) |
Abort on strbuf errors
Users of the strbuf API are supposed to check for an OOM condition
after appending to strbufs, but:
* This is never done in the whole code base.
* The implementation was flawed because only `ptr` was set to the
OOM value without adjusting `size` and `asize`. After an error,
subsequent calls could very well lead to segfaults, contrary to the
documentation.
Change the code to always abort on errors with a message printed to
stderr. The only alternative is to propagate errors throughout the
whole library which seems infeasible.
Diffstat (limited to 'man/man1/cmark.1')
0 files changed, 0 insertions, 0 deletions